Note: This example does not work in Internet Explorer and Opera.
<style type="text/css">
div
{
width:100px;
height:100px;
background:red;
animation: ARGH 5s; /* ANIMATION NAME = ARGH // ANIMATION DURATION 5s */
-moz-animation: ARGH 5s; /* Firefox */
-webkit-animation: ARGH 5s; /* Safari and Chrome */
}
@keyframes ARGH
{
from {background:red;} /* START KEYFRAME */
to {background:green;} /* END KEYFRAME */
}
@-moz-keyframes ARGH /* Firefox */
{
from {background:red;}
to {background:green;}
}
@-webkit-keyframes ARGH /* Safari and Chrome */
{
from {background:red;}
to {background:green;}
}
</style>