Skip to content

Instantly share code, notes, and snippets.

@mikeplate
Created May 19, 2013 17:27
Show Gist options
  • Select an option

  • Save mikeplate/5608343 to your computer and use it in GitHub Desktop.

Select an option

Save mikeplate/5608343 to your computer and use it in GitHub Desktop.
Curly Shadow
<!DOCTYPE html>
<title>Curly Shadow</title>
<style>
body {
margin: 0px;
font-family: Calibri, sans-serif;
background-color: #eee;
}
* {
-webkit-box-sizing: border-box;
-moz-boz-sizing: border-box;
box-sizing: border-box;
}
.page {
width: 500px;
height: 500px;
margin: 0px auto;
background-color: #fff;
padding: 20px;
text-align: center;
margin-top: 20px;
}
.shadow {
position: relative;
box-shadow: 0 0 5px #bbb;
}
.shadow:after, .shadow:before {
position: absolute;
background: transparent;
width: 40%;
height: 10px;
content: ' ';
left: 10px;
bottom: 10px;
-webkit-transform: skew(-5deg) rotate(-5deg);
-moz-transform: skew(-5deg) rotate(-5deg);
transform: skew(-5deg) rotate(-5deg);
box-shadow: 0 8px 12px #bbb;
z-index: -1;
}
.shadow:after {
left: auto;
right: 10px;
-webkit-transform: skew(5deg) rotate(5deg);
-moz-transform: skew(5deg) rotate(5deg);
transform: skew(5deg) rotate(5deg);
}
</style>
<div class="page shadow">This is a box with a curly shadow</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment