Skip to content

Instantly share code, notes, and snippets.

@pketh
Created January 20, 2015 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pketh/b1f47968999bda0d6adc to your computer and use it in GitHub Desktop.
Save pketh/b1f47968999bda0d6adc to your computer and use it in GitHub Desktop.
animating background colors with css
/* 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
}
}
@pketh
Copy link
Author

pketh commented Jan 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment