CSS animation-name property

Use the animation-name property to set the name of the @keyframes animation.

You can try to run the following code to implement the animation-name property:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 150px;
            height: 200px;
            background-color: yellow;
            animation-name: myanim;
            animation-duration: 3s;
            animation-delay: 3s;
         }
         @keyframes myanim {
            from {
               background-color: green;
            }
            to {
               background-color: blue;
            }
         }
      </style>
   </head>
   <body>
      <div></div>
   </body>
</html>
Updated on: 2020-06-24T06:07:22+05:30

92 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements