Created
November 16, 2016 16:27
-
-
Save bekapod/79a6318b1d06e0e1ef16ee5cc98fc73a to your computer and use it in GitHub Desktop.
CSS: Masonry Grid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.masonry-grid { | |
column-count: 1; | |
column-gap: 0; | |
column-fill: auto; | |
@media (min-width: 768px) { | |
column-count: 3; | |
} | |
} | |
.masonry-grid-item { | |
break-inside: avoid; | |
width: auto; | |
float: none; | |
overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment