🎞️ CSS Animation Generator
Pick an animation preset, tune the duration, timing and iterations, and copy the @keyframes and animation CSS. The preview plays it live.
@keyframes lt-fade-in-up {
from { opacity: 0; transform: translateY(24px); }
to { opacity: 1; transform: translateY(0); }
}
.animated {
animation: 1s ease 0s 1 lt-fade-in-up;
}How the css animation generator works
A CSS animation has two parts: a @keyframes rule that defines what changes over time, and the animation property that applies it with a duration, timing function, delay and iteration count. This generator gives you a set of common presets (fade-in, slide-in, bounce, pulse, spin, shake, flip and more), lets you adjust the timing, and plays the result live so you can feel it before you ship it. It outputs the full @keyframes block plus the animation shorthand, ready to paste. Everything runs in your browser.
Animate transform and opacity wherever possible, they are GPU-composited and smooth, unlike animating layout properties such as width, height, top or left, which force the browser to recalculate layout each frame. Set iterations to infinite for loaders and spinners, or 1 for a one-shot entrance effect. The timing function shapes the acceleration; pair this with the cubic-bezier generator for custom easing.
Frequently asked questions
How do CSS animations work?
You define a @keyframes rule describing the changes (for example from opacity 0 to 1), then apply it with the animation property, which sets the duration, timing function, delay, iteration count and the keyframes name. This tool writes both parts for you.
What is the difference between a CSS animation and a transition?
A transition animates between two states triggered by a change (like hover), start and end only. An animation uses @keyframes to move through many steps and can loop, run on load, and play without any trigger. Use transitions for simple state changes and animations for multi-step or looping motion.
How do I make an animation loop forever?
Set the iteration count to infinite. This tool has an infinite option; the resulting CSS is animation: ... infinite, which is how spinners and pulsing effects run continuously.
Which properties are smooth to animate?
transform (translate, scale, rotate) and opacity, because the browser can composite them on the GPU without recalculating layout. Avoid animating width, height, top, left, margin or padding, which trigger layout on every frame and can cause jank.
Is my animation uploaded?
No. The CSS is generated and previewed entirely in your browser; nothing is sent to a server.