Skip to content

Instantly share code, notes, and snippets.

@christianhanvey
Created May 16, 2012 08:15
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 christianhanvey/2708623 to your computer and use it in GitHub Desktop.
Save christianhanvey/2708623 to your computer and use it in GitHub Desktop.
Page Curl Boxes
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Matt Hamm's Page Curl Boxes &middot; CodePen</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
<style>
ul.box {
position: relative;
z-index: 1;
overflow: hidden;
list-style: none;
}
ul.box li {
position: relative;
float: left;
width: 250px;
height: 150px;
padding: 0;
border: 1px solid #efefef;
margin: 0 30px 30px 0;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
}
ul.box li:before, ul.box li:after {
content: '';
z-index: -1;
position: absolute;
left: 10px;
bottom: 10px;
width: 70%;
max-width: 300px;
max-height: 100px;
height: 55%;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
transform: skew(-15deg) rotate(-6deg);
}
ul.box li:after {
left: auto;
right: 10px;
transform: skew(15deg) rotate(6deg);
}
body {
background: url(http://matthamm.com/images/noise.png);
padding: 20px;
}
h1 {
font: normal 36px Georgia, Serif;
margin: 0 0 20px 0;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}
</style>
<script src="http://codepen.io/javascripts/libs/prefixfree.min.js"></script>
</head>
<body>
<h1>Matt Hamm&#39;s Page Curl Boxes</h1>
<ul class="box" markdown="1">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>

Matt Hamm's Page Curl Boxes

@import "compass";
ul.box {
position: relative;
z-index: 1;
overflow: hidden;
list-style: none;
li {
position: relative;
float: left;
width: 250px;
height: 150px;
padding: 0;
border: 1px solid #efefef;
margin: 0 30px 30px 0;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
&:before,
&:after {
content: '';
z-index: -1;
position: absolute;
left: 10px;
bottom: 10px;
width: 70%;
max-width: 300px;
max-height: 100px;
height: 55%;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
transform: skew(-15deg) rotate(-6deg);
}
&:after {
left: auto;
right: 10px;
transform: skew(15deg) rotate(6deg);
}
}
}
body {
background: url(http://matthamm.com/images/noise.png);
padding: 20px;
}
h1 {
font: normal 36px Georgia, Serif;
margin: 0 0 20px 0;
text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment