Created
January 20, 2015 04:44
-
-
Save pketh/b1f47968999bda0d6adc to your computer and use it in GitHub Desktop.
animating background colors with 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
/* ripped off from ea1.co */ | |
/* (just add vendor prefixes) */ | |
body { | |
animation: background-animation-cool 5s linear infinite alternate; | |
} | |
section:nth-child(2n+1) { | |
animation: background-animation-warm 5s linear infinite alternate; | |
} | |
@keyframes background-animation-warm { | |
0% { | |
background: #fff5f5 | |
} | |
100% { | |
background: #f5f5ff | |
} | |
} | |
@keyframes background-animation-cool { | |
0% { | |
background: #f8fff5 | |
} | |
100% { | |
background: #f5f5ff | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from http://ea1.co