Last active
September 23, 2015 13:03
-
-
Save Itachi261092/3898eb7e8849f2c97c74 to your computer and use it in GitHub Desktop.
[CSS] Crossbrowsing black & white filter for images. / Кроссбраузерный ч/б фильтр для изображений
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
.SomeClass{ | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><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>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
filter: gray; /* IE6-9 */ | |
-webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */ | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: grayscale(100%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment