Last active
January 30, 2017 18:41
-
-
Save miya0001/cc313f81373987fd78026e9086373779 to your computer and use it in GitHub Desktop.
Masonry layout
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
.masonry-gallery | |
{ | |
column-count: 5; | |
-moz-column-count: 5; | |
column-gap: 8px; | |
-moz-column-gap: 8px; | |
margin: 1em 0; | |
padding: 0; | |
} | |
.masonry-gallery .masonry-gallery-item | |
{ | |
display: inline-block; | |
margin: 0 0 8px 0; | |
padding: 0; | |
width: 100%; | |
max-width: 100%; | |
} | |
@media screen and ( max-width: 768px ) | |
{ | |
.masonry-gallery | |
{ | |
column-count: 3; | |
-moz-column-count: 3; | |
} | |
} |
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
<div class="masonry-gallery"> | |
<figure class="masonry-gallery-item"> | |
<a href="..."> | |
<img width="165" height="210" ...> | |
</a> | |
</figure> | |
<figure class="masonry-gallery-item"> | |
<a href="..."> | |
<img width="165" height="210" ...> | |
</a> | |
</figure> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment