Skip to content

Instantly share code, notes, and snippets.

@NdYAG
Created February 20, 2014 06:25
Show Gist options
  • Select an option

  • Save NdYAG/9108080 to your computer and use it in GitHub Desktop.

Select an option

Save NdYAG/9108080 to your computer and use it in GitHub Desktop.
A Pen by Simon.
div.card
p Place anything you like here
div.card
div.book
div.card
div.card
div.card
@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