Skip to content

Instantly share code, notes, and snippets.

@pbroschwitz
Forked from LeaVerou/dabblet.css
Created January 5, 2012 00:49
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 pbroschwitz/1563111 to your computer and use it in GitHub Desktop.
Save pbroschwitz/1563111 to your computer and use it in GitHub Desktop.
box-shadow vs drop-shadow
/**
* box-shadow vs drop-shadow
* Webkit-only at the moment (Chrome Canary or Webkit nightlies)
*/
div {
position: relative;
width: 150px;
padding: 20px;
border: 5px dotted;
border-radius: 20px;
margin: 60px;
color: #f06;
font: bold 150% sans-serif;
}
div.drop-shadow {
-webkit-filter: drop-shadow(3px 3px 5px gray);
}
div.box-shadow {
box-shadow: 3px 3px 5px gray;
}
div:after {
content: '';
position: absolute;
right: -40px;
top: 25px;
border: 20px solid transparent;
border-left-color: #f06;
}
<div class="drop-shadow">I &#x2665; SVG filters!</div>
<div class="box-shadow">I &#x2665; CSS3 box-shadow!</div>
{"view":"split-vertical","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment