Skip to content

Instantly share code, notes, and snippets.

@taesheren
Created February 10, 2012 04:01
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 taesheren/1786418 to your computer and use it in GitHub Desktop.
Save taesheren/1786418 to your computer and use it in GitHub Desktop.
Pure CSS3 box-shadow page curl effect by Matt Hamm | http://matthamm.com/box-shadow-curl.html
/*
* Pure CSS3 box-shadow page curl effect by Matt Hamm | http://matthamm.com/box-shadow-curl.html
*/
ul.box {
float: left;
list-style: none;
margin: 10px 10px;
overflow: hidden;
padding: 5px;
position: relative;
z-index: 1; /* prevent shadows falling behind containers with backgrounds */
}
ul.box li {
background: #fff;
border: 1px solid #efefef;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
height: 110px;
margin: 0 0 30px 0;
padding: 20px;
position: relative;
width: 210px;
}
ul.box li:before,
ul.box li:after {
bottom: 10px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
content: '';
left: 10px;
height: 55%;
max-width: 300px; /* avoid rotation causing ugly appearance at large container widths */
position: absolute;
transform: skew(-15deg) rotate(-6deg);
width: 70%;
z-index: -1;
}
ul.box li:after {
left: auto;
right: 10px;
transform: skew(15deg) rotate(6deg);
}
<!-- content to be placed inside <body>…</body> -->
<ul class="box">
<li>Hello</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment