Skip to content

Instantly share code, notes, and snippets.

@minitech
Created November 7, 2012 15:29
Show Gist options
  • Save minitech/4032249 to your computer and use it in GitHub Desktop.
Save minitech/4032249 to your computer and use it in GitHub Desktop.
Using a box-shadow to mimic a gradient
/**
* Using a box-shadow to mimic a gradient
*/
#item {
background-color: #07f;
border-radius: 0.2em;
box-shadow: inset 0 -1em 1em -0.5em rgba(0, 0, 0, 0.7);
color: white;
display: inline-block;
font-family: sans-serif;
padding: 0.2em;
}
<div id="item">Hello, world!</div>
{"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