Created
January 8, 2016 23:40
-
-
Save ZAYEC77/9c2b3f43c16cd869c803 to your computer and use it in GitHub Desktop.
transition image grayscale on css3
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
.grayscale { | |
-webkit-filter: grayscale(100%); | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: grayscale(100%); | |
filter: gray; /* IE 6-9 */ | |
-webkit-transition: all 1s; | |
-moz-transition: all 1s; | |
-o-transition: all 1s; | |
transition: all 1s; | |
} | |
.grayscale:hover { | |
-webkit-filter: none; | |
-moz-filter: none; | |
-ms-filter: none; | |
-o-filter: none; | |
filter: none; | |
filter: none; /* IE 6-9 */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment