How to use the CSS Animation Generator
- Choose a preset — or edit the keyframes directly.
- Adjust duration, delay, easing, repeat count and direction.
- Copy the @keyframes and class.
What does this tool do?
The output includes a prefers-reduced-motion media query so people who get motion sickness can opt out — an accessibility best practice. Animating transform and opacity, as these presets do, keeps animations smooth because browsers can run them on the GPU.
Why use it?
- 13 presets.
- Editable keyframes.
- Reduced-motion ready.
Use cases
- Entrance animations for cards, modals and hero headings.
- Attention cues like a pulsing “new” badge or a shaking error field.
- Loading indicators without JavaScript or images.
A fade-in-up entrance
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.card { animation: fadeInUp 0.5s ease-out both; }
Common mistakes
- Animating width, height or top/left, which forces layout on every frame — animate transform and opacity instead.
- Looping animations forever in the reading area; they distract and drain battery.
- Leaving out the reduced-motion fallback — keep the generated media query.
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Frequently asked questions
What does animation-fill-mode: both do?
It applies the first keyframe before the animation starts (during any delay) and keeps the last keyframe after it ends.
How do I stagger several items?
Give each item a slightly longer animation-delay, for example 0s, 0.1s, 0.2s.
CSS animation or transition?
Transitions animate between two states when something changes (like hover). Animations run on their own and can have many steps.
Content last updated . See how M2Toolkit works.