You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
822 B
50 lines
822 B
.gallery {
|
|
column-count: 4;
|
|
column-gap: 1em;
|
|
}
|
|
|
|
.gallery > div {
|
|
margin-bottom: 1em;
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
width: 100%;
|
|
height: auto;
|
|
position: relative;
|
|
}
|
|
|
|
.gallery > div > img {
|
|
margin-bottom: -5px;
|
|
}
|
|
|
|
.overlay {
|
|
position: absolute;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
opacity: 0;
|
|
transition: .5s ease;
|
|
background-color: rgba(0, 0, 0, 0.8);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.gallery > div:hover .overlay {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* mobile */
|
|
@media (max-aspect-ratio: 1/1) {
|
|
.gallery {
|
|
column-count: 2;
|
|
}
|
|
}
|
|
|
|
@media (max-aspect-ratio: 5/7) {
|
|
.gallery {
|
|
column-count: 1;
|
|
}
|
|
} |