-
-
Save pselle/3711519 to your computer and use it in GitHub Desktop.
Using :before for interesting shadows by @shoshizilla
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
/** | |
* Using :before for interesting shadows by @shoshizilla | |
*/ | |
div { | |
background: #725bc4; | |
float: left; | |
height: 100px; | |
margin: 40px; | |
position: relative; | |
width: 300px; | |
} | |
div.crazy::before { | |
content: ""; | |
position: absolute; | |
/* Negative positioning is usually a bad idea, | |
but we're doing something crazy here */ | |
top: -5px; | |
bottom: 100px; | |
left: -30px; | |
right: -30px; | |
-moz-box-shadow: 0 5px 8px rgba(0,0,0,0.9); | |
-webkit-box-shadow: 0 5px 8px rgba(0,0,0,0.9); | |
box-shadow: 0 5px 8px rgba(0,0,0,0.9); | |
-moz-border-radius: 500px / 10px; | |
-webkit-border-radius: 500px / 10px; | |
border-radius: 500px / 10px; | |
} | |
div.normal { | |
-moz-box-shadow: 0 20px 15px -15px rgba(0,0,0,0.9); | |
-webkit-box-shadow: 0 20px 15px -15px rgba(0,0,0,0.9); | |
box-shadow: 0 20px 15px -15px rgba(0,0,0,0.9); | |
} | |
|
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
<div class="crazy">Crazy</div> | |
<div class="normal">Normal</div> | |
|
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment