Created
December 10, 2015 10:35
-
-
Save ajaegers/52a82619cc191f898ec4 to your computer and use it in GitHub Desktop.
Css animation rainbow effect based on rotating hue colors
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
/** | |
* Found in http://mapbox.com footer (hover robot) | |
*/ | |
.element:hover { | |
-webkit-animation: rainbow 4s steps(36) infinite; | |
} | |
@-webkit-keyframes rainbow { | |
from { -webkit-filter:hue-rotate(10deg); } | |
to { -webkit-filter:hue-rotate(360deg); } | |
} | |
@keyframes rainbow { | |
from { | |
-webkit-filter:hue-rotate(10deg); | |
filter:hue-rotate(10deg); | |
} | |
to { | |
-webkit-filter:hue-rotate(360deg); | |
filter:hue-rotate(360deg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment