Created
February 20, 2014 06:25
-
-
Save NdYAG/9108080 to your computer and use it in GitHub Desktop.
A Pen by Simon.
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
| div.card | |
| p Place anything you like here | |
| div.card | |
| div.book | |
| div.card | |
| div.card | |
| div.card |
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
| @import "compass"; | |
| @mixin auto-scaling($width, $ratio) { | |
| width: $width; | |
| &:before { | |
| content: ""; | |
| float: left; | |
| margin-top: $ratio; | |
| } | |
| } | |
| .card { | |
| @include auto-scaling(20%, 160%); | |
| background: lightsalmon; | |
| margin: 10px 2.5%; | |
| float: left; | |
| } | |
| // misc | |
| .card { | |
| position: relative; | |
| .book { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; | |
| background-image: url("http://img3.douban.com/lpic/s4435230.jpg"); | |
| background-size: cover; | |
| box-shadow: inset 0 0 1px #333; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment