Skip to content

Instantly share code, notes, and snippets.

@sathvikc
Created September 7, 2015 16:58
Show Gist options
  • Save sathvikc/13948caae8ccdc770780 to your computer and use it in GitHub Desktop.
Save sathvikc/13948caae8ccdc770780 to your computer and use it in GitHub Desktop.
Changing colour using CSS
/*
Mention the tag id="typed".
For eg. : <h1 id="typed">Color Changer</h1>
*/
#typed{
animation-name:color_change;
animation-duration:1s;
animation-iteration-count:infinite;
animation-direction:alternate;
}
@-webkit-keyframes color_change {
from { color: blue; }
to { color: red; }
}
@-moz-keyframes color_change {
from { color: blue; }
to { color: red; }
}
@-ms-keyframes color_change {
from { color: blue; }
to { color: red; }
}
@-o-keyframes color_change {
from { color: blue; }
to { color: red; }
}
@keyframes color_change {
from { color: blue; }
to { color: red; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment