Created
September 6, 2013 14:36
-
-
Save ridgehkr/6464710 to your computer and use it in GitHub Desktop.
CSS3 radial dropshadow (requires compass)
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
// drop-shadow for bottom of element | |
.bottom-drop-shadow { | |
position:relative; | |
background: #fff; | |
&:after { | |
content:""; | |
position:absolute; | |
z-index:-1; | |
bottom: 0; | |
width: 90%; | |
height: 50%; | |
left: 5%; | |
right: 5%; | |
@include border-radius(100%); | |
@include box-shadow(rgba(0,0,0,0.4) 0 0 4.8rem); | |
} | |
} | |
// drop-shadow for top of element | |
.top-drop-shadow { | |
position:relative; | |
background: #fff; | |
&:before { | |
content:""; | |
position:absolute; | |
z-index:-1; | |
top: 0; | |
width: 90%; | |
height: 50%; | |
left: 5%; | |
right: 5%; | |
@include border-radius(100%); | |
@include box-shadow(rgba(0,0,0,0.4) 0 0 4.8rem); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment