Skip to content

Instantly share code, notes, and snippets.

@alvaropinot
Created February 13, 2014 17:21
Show Gist options
  • Save alvaropinot/8979576 to your computer and use it in GitHub Desktop.
Save alvaropinot/8979576 to your computer and use it in GitHub Desktop.
A Pen by NeatNait.
<div class="background"></div>
<div class="paper"></div>
<h1>made with love at <a href="#">neatnait</a></h1>

Paper css shadows

Testing some lighting and shadows, trying to obtain a kind of realistic paper.

A Pen by NeatNait on CodePen.

License.

@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:300);
html,body{
height:100%;
}
body{
padding:8em 0;
font-family: 'Source Sans Pro', sans-serif;
}
.background{
z-index:-1;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background: #9bb8b3; /* Old browsers */
background: -moz-linear-gradient(top, #9bb8b3 0%, #b3eee2 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9bb8b3), color-stop(100%,#b3eee2)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #9bb8b3 0%,#b3eee2 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #9bb8b3 0%,#b3eee2 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #9bb8b3 0%,#b3eee2 100%); /* IE10+ */
background: linear-gradient(to bottom, #9bb8b3 0%,#b3eee2 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9bb8b3', endColorstr='#b3eee2',GradientType=0 ); /* IE6-9 */
}
.paper{
width:35em;
height:50em;
background: #e8e8ea; /* Old browsers */
background: -moz-linear-gradient(top, #e8e8ea 0%, #efefef 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e8e8ea), color-stop(100%,#efefef)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #e8e8ea 0%,#efefef 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #e8e8ea 0%,#efefef 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #e8e8ea 0%,#efefef 100%); /* IE10+ */
background: linear-gradient(to bottom, #e8e8ea 0%,#efefef 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8e8ea', endColorstr='#efefef',GradientType=0 ); /* IE6-9 */
margin:auto;
border-radius:2px;
border-left: 2px solid #f5f5f7;
border-bottom: 2px solid #f5f5f7;
border-right: 1px solid #adc0bc;
border-top: 1px solid #f4f4f6;
box-shadow: 0 0 2px 0 #f4f4f6 inset,
0em 100px 500px -5px rgba(255,255,255,.5),
-1em 1em 3em 1em rgba(255,255,255,.2),
-5em 1em 30em 1em rgba(255,255,255,.2),
0em 2px 0 rgba(255,255,255,.7),
0em 10px 50px -10px rgba(255,255,255,1),
1.2em -0.8em 2em 0em #044134,
5.5em -1em 50em 0em #044134,
0px -5px 25px 0px #808f8c;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
backface-visibility:hidden;
}
.paper:hover{
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-ms-transform: scale(1.2);
-o-transform: scale(1.2);
transform: scale(1.2);
}
h1{
margin:5em 0;
margin-bottom:50px;
color:#111;
font-weight:normal;
text-align:center;
text-shadow: 0 0px 20px #eee;
}
a{
text-decoration:none;
color:#ff0066;
transition:all .5s ease;
display:inline-block;
border-bottom:1px solid white;
}
a:hover{
border-bottom:1px solid black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment