These are the functions of css3. Will not work everywhere
Set the animation in some style:
-webkit-animation-duration: 10s;
Name him
-webkit-animation-name: colours;
And use as you need
@-webkit-keyframes colours { 0% {background-color: #39f;} 15% {background-color: #8bc5d1;} 30% {background-color: #f8cb4a;} 45% {background-color: #95b850;} 60% {background-color: #944893;} 75% {background-color: #c71f00;} 90% {background-color: #bdb280;} 100% {background-color: #39f;} }
Example: http://jsfiddle.net/gk37un0r/
source share