Computer >> Computer tutorials >  >> Programming >> CSS

CSS3 Animation @keyframes


Keyframes control the intermediate animation steps in CSS3.

 Let us see an example to show height, width, color, name, and duration of animation with keyframes syntax

@keyframes animation {
   from {background-color: pink;}
   to {background-color: green;}
}
div {
   width: 100px;
   height: 100px;
   background-color: red;
   animation-name: animation;
   animation-duration: 5s;
}