<div>
<div>
<div>
<div>
<div>
<div>
Podgląd pracy wynikowej
<section class="gallery" id="gallery">
<h2 class="gallery__title">Gallery</h2>
<div class="gallery__content">
<div class="gallery__column">
...
</div>
<div class="gallery__column">
...
</div>
<div class="gallery__column">
...
</div>
</div>
</section>.gallery__content {
margin: 0 auto;
padding-left: 20px;
padding-right: 20px;
width: 1050px;
}
.gallery__column {
display: inline-block;
vertical-align: top;
width: 320px;
}podgląd wynikowy
<div class="gallery__column">
<div class="box-container">
<div class="box box--1"></div>
</div>
<div class="box-container">
<div class="box box--2"></div>
</div>
<div class="box-container">
<div class="box box--3"></div>
</div>
</div>.box-container {
margin-bottom: 20px;
overflow: hidden;
}
.box {
width: 360px;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
transform: translate3d(-40px, 0, 0);
}
.box:hover {
-webkit-filter: grayscale(0);
-moz-filter: grayscale(0);
filter: grayscale(0);
transform: translate3d(0, 0, 0);
}
.box--1 {
background-image: url("https://example.com/img1.jpg");
height: 300px;
}podgląd wynikowy
Przygotuj sekcję galerii: