Created
November 5, 2012 04:06
-
-
Save Ricardo-Diaz/4015260 to your computer and use it in GitHub Desktop.
CSS: Box Shadow Lifted Left Corner
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 uses half of the effect approve and will add a lifted corner to the bottom left of the box. | |
The HTML | |
<div class="box effect3"> | |
<h3>Effect 3</h3> | |
</div> | |
The CSS | |
.box h3{ | |
text-align:center; | |
position:relative; | |
top:80px; | |
} | |
.box { | |
width:70%; | |
height:200px; | |
background:#FFF; | |
margin:40px auto; | |
} | |
/*================================================== | |
* Effect 3 | |
* ===============================================*/ | |
.effect3 | |
{ | |
position: relative; | |
} | |
.effect3:before | |
{ | |
z-index: -1; | |
position: absolute; | |
content: ""; | |
bottom: 15px; | |
left: 10px; | |
width: 50%; | |
top: 80%; | |
max-width:300px; | |
background: #777; | |
-webkit-box-shadow: 0 15px 10px #777; | |
-moz-box-shadow: 0 15px 10px #777; | |
box-shadow: 0 15px 10px #777; | |
-webkit-transform: rotate(-3deg); | |
-moz-transform: rotate(-3deg); | |
-o-transform: rotate(-3deg); | |
-ms-transform: rotate(-3deg); | |
transform: rotate(-3deg); | |
}This uses half of the effect approve and will add a lifted corner to the bottom left of the box. | |
The HTML | |
<div class="box effect3"> | |
<h3>Effect 3</h3> | |
</div> | |
The CSS | |
.box h3{ | |
text-align:center; | |
position:relative; | |
top:80px; | |
} | |
.box { | |
width:70%; | |
height:200px; | |
background:#FFF; | |
margin:40px auto; | |
} | |
/*================================================== | |
* Effect 3 | |
* ===============================================*/ | |
.effect3 | |
{ | |
position: relative; | |
} | |
.effect3:before | |
{ | |
z-index: -1; | |
position: absolute; | |
content: ""; | |
bottom: 15px; | |
left: 10px; | |
width: 50%; | |
top: 80%; | |
max-width:300px; | |
background: #777; | |
-webkit-box-shadow: 0 15px 10px #777; | |
-moz-box-shadow: 0 15px 10px #777; | |
box-shadow: 0 15px 10px #777; | |
-webkit-transform: rotate(-3deg); | |
-moz-transform: rotate(-3deg); | |
-o-transform: rotate(-3deg); | |
-ms-transform: rotate(-3deg); | |
transform: rotate(-3deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment