- Instant help with your CSS coding problems

Create endless rotation animation in CSS

Question:
How to create endless rotation animation in CSS?
Answer:
.rotate {
    animation: rotation 1s infinite linear;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
Description:

CSS animations make it possible to animate transitions from one CSS style configuration to another. To create an endless rotation animation simply define a @keyframe with any name and from and to values. Then you can use this @keyframe in your animation in any CSS class. 

Share "How to create endless rotation animation in CSS?"
Tags:
rotate animation, endless rotation, infinite animation, rotate around, css
Technical term:
Create endless rotation animation in CSS
Interesting things
OpanAi's ChatGPT