Created
February 10, 2012 04:01
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<ul class="box"> | |
<li>Hello</li> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment