Skip to content

Instantly share code, notes, and snippets.

@Snugug
Created January 5, 2012 00:02
Show Gist options
  • Select an option

  • Save Snugug/1562939 to your computer and use it in GitHub Desktop.

Select an option

Save Snugug/1562939 to your computer and use it in GitHub Desktop.
SVG Filter Shadows on CSS Images
/**
* SVG Filter Shadows on CSS Images
* See http://dabblet.com/gist/1562718 for my inspiration.
* Original by Lea Verou. Just wanted to see the triangles blown out
* Top triangle uses the SVG Shadow (notice how it's actually a triangle)
* Bottom is current CSS box shadow (notice how it sucks?)
*
* Need Webkit Nightly or Canary Chrome to see.
*/
div {
content: '';
margin-top: 25px;
border: 20px solid transparent;
border-left-color: #f06;
}
div.triangle-drop {
-webkit-filter: drop-shadow(3px 3px 5px gray);
}
div.triangle-box {
box-shadow: 3px 3px 5px gray;
}
<div class="triangle-drop"></div>
<div class="triangle-box"></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