Skip to content

Instantly share code, notes, and snippets.

@krman009
Created January 2, 2014 11:12
Show Gist options
  • Save krman009/8217760 to your computer and use it in GitHub Desktop.
Save krman009/8217760 to your computer and use it in GitHub Desktop.
A Pen by Kaushalya Mandaliya.
<!--
Animated Responsive Article Grid
2014 by Kaushalya Mandaliya
http://seebeetee.com || https://twitter.com/kmandalwala
-->
for ( i = 1; i <= 20; i++) {
document.write("<span>" + "Article " + i + "</span>"); // or span{Article $}*20 in HTML box...:D
}
@import "compass";
@import url(http://fonts.googleapis.com/css?family=Ubuntu);
body {
font: normal 2em 'Ubuntu', sans-serif;
text-align: center;
span {
background: #3498db;
color: #ecf0f1;
float: left;
padding: 1em 0;
position: relative;
width: 25%;
@include backface-visibility(hidden);
@include transition(0.25s all);
@media all and (max-width: 62.7em) {
&:before {
top: 0;
}
}
@media all and (max-width: 36em) {
font-size: 0.8em;
}
@media all and (max-width: 32em) {
font-size: 1em;
width: 50%;
}
&:hover {
background: rgba(#3498db, 0.7);
cursor: pointer;
&:before {
content: 'Go to →';
font-size: 0.5em;
left: 0.3em;
position: absolute;
margin-top: 0.5em;
}
}
&:active {
background: #3498d2;
@include transform(scale(0.8));
z-index: 2000;
}
}
}
hr {
border-color: #000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment