Skip to content

Instantly share code, notes, and snippets.

@ridgehkr
Created September 6, 2013 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridgehkr/6464710 to your computer and use it in GitHub Desktop.
Save ridgehkr/6464710 to your computer and use it in GitHub Desktop.
CSS3 radial dropshadow (requires compass)
// 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