HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> h2 { color: blue; -webkit-animation: myMultiColor 1s infinite; animation: myMultiColor 1s 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>Animation is Awesome</h2> <p id="point"></p> <script> var x = document.getElementsByTagName("h2")[0]; function myFunction() { document.getElementById("point").innerHTML = "Animation started!"; } x.addEventListener("animationstart", myFunction); </script> </body> </html>
OUTPUT
×

Save as Private