Pick a keyframe preset, set duration, delay, easing and iteration count, replay it as often as you like, and copy the keyframes with the shorthand.
Without forwards or both, the element snaps back to its starting state the instant the animation ends.
@keyframes fade-up {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
.animated {
animation: fade-up 400ms cubic-bezier(0.4, 0, 0.2, 1) 1 both;
}
@media (prefers-reduced-motion: reduce) {
.animated {
animation: none;
}
}CSS Animation Generator runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
An animation is two separate things: a `@keyframes` block that describes what changes, and an `animation` shorthand on the element that says how long it takes and how it is timed. Both are produced here, because a keyframes block on its own does nothing and an animation shorthand naming keyframes that do not exist fails silently.
Easing is what separates animation that reads as deliberate from animation that reads as a glitch. `linear` is almost always wrong for movement because nothing physical moves at a constant speed. `ease-out` is the right default for something entering, since it arrives quickly and settles; `ease-in` suits something leaving. The custom cubic-bezier option is there for the overshoot curves, which cannot be expressed any other way.
Only some properties are cheap to animate. `transform` and `opacity` can be handled by the compositor without recalculating layout or repainting, so they animate smoothly even on a loaded page. Animating `width`, `height`, `top` or `margin` forces layout on every frame, and that is the usual reason an animation that is fine on a desktop stutters on a phone. The presets here stay on the cheap properties.
`prefers-reduced-motion` is not optional politeness — for some people motion causes real nausea and vertigo. Every output here comes with the media query that disables the animation for anyone who has asked their system for less motion, as part of the copied CSS rather than as a suggestion in the documentation.
transform and opacity, because both can be composited without recalculating layout. Animating width, height, top, left or margin forces a layout pass on every frame, which is why those animations stutter under load.
Because animation-fill-mode defaults to none, so the element returns to its unanimated state the moment the animation finishes. Set fill-mode to forwards to hold the final keyframe.
A transition animates between two states and needs something to change it — a hover, a class. An animation runs on its own from a keyframes block and can loop. If nothing triggers the change, you need an animation.
It reports that the visitor has asked their operating system for less motion, usually because movement causes nausea or vertigo for them. The output here includes a media query that turns the animation off for those visitors, which is why it is part of the copied CSS and not a footnote.
The presets are editable in the sense that the generated keyframes block is right there to copy and change. The generator covers the common curves; hand-writing the block is the right move once you need something it does not offer.