<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
h2{
color: blue;
-webkit-animation: myMultiColor 2s infinite;
animation: myMultiColor 2s infinite;
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes myMultiColor{
from {color: blue;}
to {color: green;}
}
/* Standard syntax */
@keyframes myMultiColor{
from {color: blue;}
to {color: green;}
}
</style>
</head>
<body>
<h2 onanimationiteration="myFunction(event)">Animation is Awesome</h2>
<p id="point"></p>
<script>
function myFunction(e){
var txt = "Elapsed Time: "+e.elapsedTime+" seconds";
document.getElementById("point").innerHTML = txt;
}
</script> </body>
</html>