CSS Transition and Animation Generator
Choose transition or animation, set duration, delay, easing, iterations and direction, and copy ready-to-use CSS including @keyframes and a reduced-motion rule.
Choose transition or animation, set duration, delay, easing, iterations and direction, and copy ready-to-use CSS including @keyframes and a reduced-motion rule.
A CSS transition smoothly changes a property from one value to another when something triggers it, such as a hover. A keyframe animation runs on its own and can pass through several steps.
Pick a mode, set the timing and copy the CSS. Animation output includes the @keyframes block, the animation shorthand and a prefers-reduced-motion rule.
.element {
transition: all 0.3s ease 0s;
}
Use a transition when a property moves between two states because of a trigger. Use an animation when it should run by itself or pass through several steps.
The element keeps the final keyframe styles after the animation ends instead of snapping back.
The tool treats 0 as infinite and writes the word infinite in the shorthand.
Opacity and transform are usually handled by the GPU. Animating width, height or margin can force layout work and feel slower.
Some people set their system to reduce motion. The block turns the animation off for them.