Created
January 5, 2012 00:02
-
-
Save Snugug/1562939 to your computer and use it in GitHub Desktop.
SVG Filter Shadows on CSS Images
This file contains hidden or 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
| /** | |
| * 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; | |
| } |
This file contains hidden or 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="triangle-drop"></div> | |
| <div class="triangle-box"></div> |
This file contains hidden or 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":"split-vertical","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment