Skip to content

Instantly share code, notes, and snippets.

@dazld
Forked from anonymous/dabblet.css
Created May 2, 2012 11:58
Show Gist options
  • Save dazld/2576084 to your computer and use it in GitHub Desktop.
Save dazld/2576084 to your computer and use it in GitHub Desktop.
Untitled
body {
width: 580px;
margin: 0 auto;
font-family: sans-serif;
font-size: 12px;
color: #666;
}
.fan {
position: relative;
width: 120px;
height: 120px;
-webkit-transition: all .333s ease-in-out;
-moz-transition:all .333s ease-in-out;
transition: all .333s ease-in-out;
margin: 12px;
float: left;
}
.fan div {
position: absolute;
top: 0;
left: 0;
background: rgba(255,255,100,0.6) ;
width: 100px;
height: 100px;
-webkit-transition: all .333s ease-in-out;
-moz-transition: all .333s ease-in-out;
transition: all .333s ease-in-out;
}
.fan div:first-child {
background: rgba(128,225,225,0.3) ;
}
.fan > div+div {
background: rgba(128,200,255,0.6) ;
}
.fan div+div+div {
background: rgba(128,200,128,0.6) ;
}
.fan div+div+div+div {
background: rgba(228,255,100,0.6) ;
}
.fan:hover {
-webkit-transform: rotate(-40deg);
-moz-transform: rotate(-40deg);
top:10px;
}
.fan:hover div {
-webkit-transform: rotate(10deg);
-moz-transform: rotate(10deg);
transform: rotate(10deg);
width: 120px;
height: 120px;
top: -10px;
left: 5px;
box-shadow: 0 2px 10px rgba(128,128,128,0.3);
}
<!-- content to be placed inside <body>…</body> -->
<h1>CSS Fans </h1>
<div class="fan">
<div>2</div>
<div>3</div>
<div>4</div>
<div>foo</div>
</div>
<div class="fan">
<div>2
<div>3
<div>4
<div>bar<div><div><div><div><div><div></div></div></div></div></div></div></div>
</div>
</div>
</div>
</div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment