grid-test
responsive grid layout
by bsorrentino
HTML
<div id="page1" class="page">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
SCSS
/*
html, body {
width: 100%;
height: 100%;
background: gray;
margin:0;
padding:0;
}
*/
html, body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
ul {
margin: 0;
padding: 0;
border: 0;
}
li {
float: left;
margin: 0;
padding: 0;
height: 33.33vh;
width: 33.33%;
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0, 0, 0, 0.3) 100%) #888;
display: inline-block;
box-shadow: 0px 16px 48px rgba(0, 0, 0, 0.5) inset;
overflow: hidden;
}
.page {
position: absolute;
min-height: 100%;
width: 100%;
background:green;
}
@for $i from 1 through 9 {
li:nth-child(#{$i}) {
background-image: url("http://lorempixel.com/480/320/nature/" +$i );
background-size: cover;
}
}