Created
April 15, 2013 11:55
-
-
Save oli/5387570 to your computer and use it in GitHub Desktop.
animating background colors
This file contains 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
/* animating background colors | |
color animation happens in RGBa space, so you can’t e.g. animate from hsl(0,50%,45%) to hsl(360,50%,45%) to get every color */ | |
body { | |
background: #f06; | |
animation: bg alternate 10s infinite; | |
min-height: 100%; | |
} | |
@keyframes bg { | |
0% {background: rgb(172, 57, 57);} | |
20% {background: rgb(172, 172, 57);} | |
40% {background: rgb(57, 172, 57);} | |
60% {background: rgb(57, 172, 172);} | |
80% {background: rgb(57, 57, 172);} | |
100% {background: rgb(172, 57, 172);} | |
} |
This file contains 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
<!-- content to be placed inside <body>…</body> --> |
This file contains 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
// alert('Hello world!'); |
This file contains 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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment