CSS Animations.

Posted by Vishalneeraj-24503 under CSS 3 category on | Points: 40 | Views : 1147
Write below code:-
width: 250px;
height: 250px;
background-color: red;
-webkit-animation-name: example; /* Chrome, Safari, Opera */
-webkit-animation-duration: 4s; /* Chrome, Safari, Opera */
animation-name: example;
animation-duration: 4s;

/* Chrome, Safari, Opera */
@-webkit-keyframes example
from {background-color: red;}
to {background-color: yellow;}

/* Standard syntax */
@keyframes example
from {background-color: red;}
to {background-color: yellow;}

<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>


<p><b>Note:</b> When an animation is finished, it changes back to its original style.</p>


Comments or Responses

Login to post response