Created
November 5, 2012 04:08
-
-
Save Ricardo-Diaz/4015264 to your computer and use it in GitHub Desktop.
CSS: Box Shadow Effect Curved Bottom
This file contains hidden or 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
This effect will create a curved shadow at the bottom of the box. | |
The HTML | |
<div class="box effect6"> | |
<h3>Effect 6</h3> | |
</div> | |
The CSS | |
.box h3{ | |
text-align:center; | |
position:relative; | |
top:80px; | |
} | |
.box { | |
width:70%; | |
height:200px; | |
background:#FFF; | |
margin:40px auto; | |
} | |
/*================================================== | |
* Effect 6 | |
* ===============================================*/ | |
.effect6 | |
{ | |
position:relative; | |
-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; | |
-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; | |
box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; | |
} | |
.effect6:before, .effect6:after | |
{ | |
content:""; | |
position:absolute; | |
z-index:-1; | |
-webkit-box-shadow:0 0 20px rgba(0,0,0,0.8); | |
-moz-box-shadow:0 0 20px rgba(0,0,0,0.8); | |
box-shadow:0 0 20px rgba(0,0,0,0.8); | |
top:50%; | |
bottom:0; | |
left:10px; | |
right:10px; | |
-moz-border-radius:100px / 10px; | |
border-radius:100px / 10px; | |
} | |
.effect6:after | |
{ | |
right:10px; | |
left:auto; | |
-webkit-transform:skew(8deg) rotate(3deg); | |
-moz-transform:skew(8deg) rotate(3deg); | |
-ms-transform:skew(8deg) rotate(3deg); | |
-o-transform:skew(8deg) rotate(3deg); | |
transform:skew(8deg) rotate(3deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment