Skip to content

Instantly share code, notes, and snippets.

@koenveldhuizen
Created February 17, 2012 22:51
Show Gist options
  • Select an option

  • Save koenveldhuizen/1855950 to your computer and use it in GitHub Desktop.

Select an option

Save koenveldhuizen/1855950 to your computer and use it in GitHub Desktop.
Very simple css3 polaroid styling
/**
* Very simple css3 polaroid styling
*/
body{
background: #f06;
background: linear-gradient(45deg, orange, yellow);
min-height:100%;
}
div#container{
width:900px;
margin:40px auto;}
img{
transition: .30s linear;
display:block;
postion:relative;
z-index:0;
float:left;
width:200px;
padding:10px 10px 40px 10px;
background: #fff;
box-shadow: 0px 0px 5px #666;
}
img:nth-child(even){transform:rotate(2deg);}
img:nth-child(3n+1){transform:rotate(-5deg);}
img:nth-child(2n+1){
background: #fdfbfb;}
img:hover{
transform:rotate(0deg);
transform: scale(1.25);
position: relative;
z-index: 5;
}
/**
to do:
use attr alt or title for nicely written title on the slab of the picture
some image effect like noise or something like that would be nice :D
**/
<!-- content to be placed inside <body>…</body> -->
<div id="container">
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
<img src="http://www.prelovac.com/vladimir/wp-content/uploads/2008/03/example.jpg" width="200px" />
</div>
{"view":"split","seethrough":"","prefixfree":"1","page":"result"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment