Created
March 31, 2015 16:24
-
-
Save acki/877a69ec37cbc2769bcd to your computer and use it in GitHub Desktop.
CSS black and white filter for images (IE6+)
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
img.desaturate{ | |
-webkit-filter: grayscale(1); -webkit-filter: grayscale(100%); | |
filter: grayscale(100%); | |
filter: gray; | |
filter: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' /></filter></svg>#greyscale"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment