Forked from gedankennebel/gist:a4c9367cda02ad7e826f
Created
February 13, 2017 18:48
-
-
Save dgdoblebe/f2c366832a93dc27e070c2fc58c3ebc2 to your computer and use it in GitHub Desktop.
CSS grayscale filter (go from grayscale to full color on hover) #css #sethneilson
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
| img:hover { | |
| -webkit-filter: grayscale(0%); | |
| -webkit-transition: .5s ease-in-out; | |
| -moz-filter: grayscale(0%); | |
| -moz-transition: .5s ease-in-out; | |
| -o-filter: grayscale(0%); | |
| -o-transition: .5s ease-in-out; | |
| filter: grayscale(0%); | |
| } | |
| img { | |
| -webkit-filter: grayscale(100%); | |
| -webkit-transition: .5s ease-in-out; | |
| -moz-filter: grayscale(100%); | |
| -moz-transition: .5s ease-in-out; | |
| -o-filter: grayscale(100%); | |
| -o-transition: .5s ease-in-out; | |
| filter: grayscale(100%); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment