, asked
Views : 2

Animate transform property with CSS Animation

With CSS, how can we perform animation on the transform property?

1 Answer
Nancy Den

To implement animation on transform property with CSS, you can try to run the following code:


Live Demo

<!DOCTYPE html>
         div {
            margin: auto;
            border: 2px solid blue;
            width: 300px;
            height: 400px;
            background-color: orange;
            animation: myanim 3s;
         @keyframes myanim {
            30% {
               transform: rotate(120deg);

Related Questions