Created
September 6, 2013 08:55
-
-
Save greystate/6461282 to your computer and use it in GitHub Desktop.
Less than full-width box-shadow below
This file contains 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
/** | |
* Less than full-width box-shadow below | |
*/ | |
body { | |
background: #f06; | |
min-height: 100%; | |
} | |
.box { | |
width: 70%; | |
height: 200px; | |
margin: 20px auto; | |
background: #fc0; | |
/* OK, so the -20px is the "inset" distance - the Y offset (30px) | |
should be that same absolute number + the desired offset... | |
*/ | |
box-shadow: 0 30px 0 -20px rgba(0, 0, 0, 0.3); | |
} |
This file contains 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="box"> | |
Loads of content to show | |
</div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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":"separate","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment