Skip to content

Instantly share code, notes, and snippets.

@ajaegers
Created December 10, 2015 10:35
Show Gist options
  • Save ajaegers/52a82619cc191f898ec4 to your computer and use it in GitHub Desktop.
Save ajaegers/52a82619cc191f898ec4 to your computer and use it in GitHub Desktop.
Css animation rainbow effect based on rotating hue colors
/**
* 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