CSS Animation Shorthand property

CSSWeb DevelopmentFront End Technology

The shorthand property to set all the animation properties is animation. It sets the animation duration, animation name, etc.

You can try to run the following code to learn how to work with Animation Shorthand property:


Live Demo

<!DOCTYPE html>
         div {
            width: 150px;
            height: 200px;
            background-color: yellow;
            animation: myanim 2s
         @keyframes myanim {
            from {
               background-color: green;
            to {
               background-color: blue;
Updated on 24-Jun-2020 06:06:13