Created
February 19, 2013 00:32
-
-
Save SBoudrias/4982022 to your computer and use it in GitHub Desktop.
Colorize black element with filters
This file contains 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
/** | |
* Colorize black element with filters | |
* Webkit-only at the moment (Chrome Canary or Webkit nightlies) | |
*/ | |
body { | |
background: pink; | |
} | |
div { | |
position: relative; | |
width: 100px; | |
height: 100px; | |
margin: 50px; | |
background: url(http://files.simurai.com/misc/svg/noun_project_745.svg) no-repeat; | |
-webkit-filter: invert() | |
sepia() | |
saturate(8000%) | |
drop-shadow(3px 3px 5px gray); | |
} | |
div:nth-child(2) { | |
-webkit-filter: invert() | |
sepia() | |
saturate(8000%) | |
hue-rotate(30deg) | |
drop-shadow(3px 3px 5px gray); | |
} |
This file contains 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="drop-shadow"></div> | |
<div class="box-shadow"></div> |
This file contains 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
// alert('Hello world!'); |
This file contains 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","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment