Created
September 7, 2015 16:58
-
-
Save sathvikc/13948caae8ccdc770780 to your computer and use it in GitHub Desktop.
Changing colour using CSS
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
/* | |
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