Skip to content

Instantly share code, notes, and snippets.

@greystate
Created September 6, 2013 08:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greystate/6461282 to your computer and use it in GitHub Desktop.
Save greystate/6461282 to your computer and use it in GitHub Desktop.
Less than full-width box-shadow below
/**
* 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);
}
<div class="box">
Loads of content to show
</div>
// alert('Hello world!');
{"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