Problem ze zbyt dużymi odstępami w galerii

2018-12-17 17:42
Chory Jeleń
0

Witam.
Mam taki kod:


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Bootstrap 101 Template</title>
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
      <![endif]-->
</head>

<body>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/jquery.fancybox.min.css" />
    <script src="js/jquery.fancybox.min.js"></script>

    <div class="container">

        <div class="col-md-12">
            <div class="row">
                <div class="gal">
                    <a data-fancybox href="https://www.youtube.com/watch?v=dHVlMCcG_8Q"><img class="card-img-top img-fluid" src="https://img.youtube.com/vi/_sI_Ps7JSEk/mqdefault.jpg"></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt="xxxxxx"></a>
                    <a data-fancybox href="https://preview.ibb.co/mWpE3Q/2.jpg"><img src="https://preview.ibb.co/mWpE3Q/2.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/mysOxk/3.jpg"><img src="https://preview.ibb.co/mysOxk/3.jpg" alt=""></a>
                    <a data-fancybox href="https://www.youtube.com/watch?v=dHVlMCcG_8Q"><img class="card-img-top img-fluid" src="https://img.youtube.com/vi/_sI_Ps7JSEk/mqdefault.jpg"></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/mWpE3Q/2.jpg"><img src="https://preview.ibb.co/mWpE3Q/2.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/mysOxk/3.jpg"><img src="https://preview.ibb.co/mysOxk/3.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://www.youtube.com/watch?v=dHVlMCcG_8Q"><img class="card-img-top img-fluid" src="https://img.youtube.com/vi/_sI_Ps7JSEk/mqdefault.jpg"></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/mysOxk/3.jpg"><img src="https://preview.ibb.co/mysOxk/3.jpg" alt=""></a>
                    <a data-fancybox href="https://www.youtube.com/watch?v=dHVlMCcG_8Q"><img class="card-img-top img-fluid" src="https://img.youtube.com/vi/_sI_Ps7JSEk/mqdefault.jpg"></a>
                    <a data-fancybox href="https://preview.ibb.co/mysOxk/3.jpg"><img src="https://preview.ibb.co/mysOxk/3.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/i0PmHk/1.jpg"><img src="https://preview.ibb.co/i0PmHk/1.jpg" alt=""></a>
                    <a data-fancybox href="https://preview.ibb.co/mWpE3Q/2.jpg"><img src="https://preview.ibb.co/mWpE3Q/2.jpg" alt=""></a>
                    <a data-fancybox href="https://www.youtube.com/watch?v=dHVlMCcG_8Q"><img class="card-img-top img-fluid" src="https://img.youtube.com/vi/_sI_Ps7JSEk/mqdefault.jpg"></a>

                </div>

            </div>
        </div>
    </div>

    <style>
        .gal {
            -webkit-column-count: 4;
            -moz-column-count: 4;
            column-count: 4;
        }

        .gal img {
            width: 100%;
            padding-top: 2px;
            padding-bottom: 2px;
            padding-left: 1px;
            padding-right: 1px;
        }

        @media(min-width: 701px) and (max-width: 1000px) {
            .gal {
                -webkit-column-count: 3;
                -moz-column-count: 3;
                column-count: 3;
            }
        }

        @media(min-width: 501px) and (max-width: 700px) {
            .gal {
                -webkit-column-count: 2;
                -moz-column-count: 2;
                column-count: 2;
            }
        }
        @media (max-width: 500px) {
            .gal {
                -webkit-column-count: 1;
                -moz-column-count: 1;
                column-count: 1;
            }
        }
    </style>
</body>

</html>

Mam zbyt duże odstępy w pionie. Podgląd galerii: https://stackoverflow.com/que[...]oo-large-intervals-in-gallery

Wie ktoś może jak zmniejszyć ten pionowy odstęp pomiędzy zdjęciami?

Pozostało 580 znaków

2018-12-17 17:44
Chory Jeleń
0

Przepraszam, podgląd galerii znajduje się tutaj: https://jsfiddle.net/pL8qkerw/

Pozostało 580 znaków

Liczba odpowiedzi na stronę

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0