A Pen by Gabe Lloyd on CodePen.
Last active
August 29, 2015 13:58
-
-
Save gabelloyd/10305816 to your computer and use it in GitHub Desktop.
A Pen by Gabe Lloyd.
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
| <h1>Masonry - stamp option</h1> | |
| <div class="masonry js-masonry" data-masonry-options='{ "columnWidth": 60, "stamp": ".stamp" }'> | |
| <div class="stamp stamp1">stamp wrapper | |
| <div class="stamp stamp2">stamp 2</div> | |
| <div class="stamp stamp2">stamp 2</div> | |
| <div class="stamp stamp2">stamp 2</div> | |
| </div> | |
| <div class="item"></div> | |
| <div class="item w2 h2"></div> | |
| <div class="item h3"></div> | |
| <div class="item h2"></div> | |
| <div class="item w3"></div> | |
| <div class="item"></div> | |
| <div class="item"></div> | |
| <div class="item h2"></div> | |
| <div class="item w2 h3"></div> | |
| <div class="item"></div> | |
| <div class="item h2"></div> | |
| <div class="item"></div> | |
| <div class="item w2 h2"></div> | |
| <div class="item w2"></div> | |
| <div class="item"></div> | |
| <div class="item h2"></div> | |
| <div class="item"></div> | |
| <div class="item"></div> | |
| <div class="item h3"></div> | |
| <div class="item h2"></div> | |
| <div class="item"></div> | |
| <div class="item"></div> | |
| <div class="item h2"></div> | |
| </div> |
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
| // http://masonry.desandro.com/masonry.pkgd.js added as external resource |
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
| * { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| body { font-family: sans-serif; } | |
| .masonry { | |
| background: #EEE; | |
| max-width: 640px; | |
| position: relative; | |
| } | |
| .item { | |
| width: 60px; | |
| height: 60px; | |
| float: left; | |
| background: #D26; | |
| border: 2px solid #333; | |
| border-color: hsla(0, 0%, 0%, 0.5); | |
| border-radius: 5px; | |
| } | |
| .item.w2 { width: 120px; } | |
| .item.w3 { width: 180px; } | |
| .item.w4 { width: 240px; } | |
| .item.h2 { height: 100px; } | |
| .item.h3 { height: 130px; } | |
| .item.h4 { height: 180px; } | |
| /* position stamp elements with CSS */ | |
| .stamp { | |
| position: absolute; | |
| background: blue; | |
| border: 4px dotted black; | |
| padding: 10px; | |
| margin: .5em 0; | |
| } | |
| .stamp1 { | |
| color: white; | |
| right: 5%; | |
| width: 30%; | |
| height: 300px; | |
| } | |
| .stamp2 { | |
| position: relative; | |
| background: orange; | |
| width: 100%; | |
| height: 50px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment