Last active
October 11, 2018 14:30
-
-
Save xto3na/9bb2e2a688ea56bc4023911b08a76639 to your computer and use it in GitHub Desktop.
Masonry grid CSS
This file contains 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
<style> | |
.masonry-layout { | |
column-count: 3; | |
-webkit-column-count: 3; | |
column-gap: 0; | |
-webkit-column-gap: 0; | |
} | |
.masonry-layout_item { | |
break-inside: avoid; | |
-webkit-column-break-inside: avoid; | |
padding: 5px; | |
} | |
</style> | |
<div class="masonry-layout"> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
<div class="masonry-layout_item"></div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment