Skip to content

Instantly share code, notes, and snippets.

@huyng
Created December 9, 2012 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huyng/4243575 to your computer and use it in GitHub Desktop.
Save huyng/4243575 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
* { margin:0px; padding:0px;}
html {
background: linear-gradient(45deg, #000, #202024 );
min-height: 100%;
color: #eee;
font: 100%/1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
}
.gallery {
position:relative;
margin:60px;
width:960px;
}
.gallery .group {
position:relative;
display:block;
float:left;
background:red;
margin:60px;
width: 200px;
height:200px;
}
.gallery .group img {
/*top: 0; left: 0;*/
position: absolute;
padding: 5px;
background: linear-gradient(#fff,#ddd);
width: 200px;
height: 200px;
box-shadow: 0 2px 4px rgba(0,0,0,.5);
transition: .4s cubic-bezier(0.860, 0.000, 0.070, 1.000);
}
.gallery .group p {
position:relative;
}
.gallery .group img:nth-last-child(2) { transform: rotate(-2deg);}
.gallery .group img:nth-last-child(3) { transform: rotate(-3deg);}
.gallery .group:hover img:nth-last-child(2) { transform: translate(20px, 0px) rotate(9deg); }
.gallery .group:hover img:nth-last-child(3) { transform: translate(40px, 0px) rotate(18deg); }
<div class="gallery">
<div class="group">
<img src="http://placedog.com/200/200">
<img src="http://placebear.com/g/200/200">
<img src="http://placedog.com/g/200/200">
</div>
<div class="group">
<img src="http://placedog.com/200/200">
<img src="http://placedog.com/g/200/200">
<img src="http://placedog.com/200/200">
</div>
<div class="group">
<img src="http://placedog.com/g/200/200">
</div>
<div class="group">
<img src="http://placedog.com/g/200/200">
</div>
</div>
{"view":"split","fontsize":"70","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment