About CSS Animation Generator
A CSS animation changes property values over time using an @keyframes rule and the animation shorthand. This generator writes both parts for eight common effects and lets you set duration, delay, easing, and repeat count. The effects animate only opacity and transform, which browsers can run without recalculating layout. The output also includes a prefers-reduced-motion rule that switches the animation off for people who ask for less motion.
How to use CSS Animation Generator
- Fill in "Effect", "Duration", "Delay" and "Easing", and the other options.
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about CSS Animation Generator
How do I keep the final state after the animation ends?
Add animation-fill-mode: forwards, or the word forwards in the shorthand. Without it the element returns to its original styles when the animation finishes. The generated code includes both for effects that run once or twice.
Runs in your browser. Page last updated .