Created
November 5, 2012 04:10
-
-
Save Ricardo-Diaz/4015279 to your computer and use it in GitHub Desktop.
CSS: Box Shadow Round Shadow effect both sides
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
rounded shadows to either side of the box. | |
The HTML | |
<div class="box effect8"> | |
<h3>Effect 8</h3> | |
</div> | |
The CSS | |
.box h3{ | |
text-align:center; | |
position:relative; | |
top:80px; | |
} | |
.box { | |
width:70%; | |
height:200px; | |
background:#FFF; | |
margin:40px auto; | |
} | |
/*================================================== | |
* Effect 8 | |
* ===============================================*/ | |
.effect8 | |
{ | |
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; | |
} | |
.effect8:before, .effect8: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:10px; | |
bottom:10px; | |
left:0; | |
right:0; | |
-moz-border-radius:100px / 10px; | |
border-radius:100px / 10px; | |
} | |
.effect8: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