<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
animation-name: example; /* Safari 4.0 - 8.0 */
-webkit-animation-duration: 4s; /* Safari 4.0 - 8.0 */
animation-name: example;
animation-duration: 4s;
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes example {
from {background-color: red;}
to {background-color: yellow;}
}
/* Standard syntax */
@keyframes example {
from {background-color: red;}
to {background-color: yellow;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
<p><b>Note:</b> When an animation is finished, it changes back to its original style.</p>
</body>
<!-- Mirrored from www.w3schools.com/css/tryit.asp?filename=trycss3_animation1 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 13:04:04 GMT -->
</html>