CSS Animation Generator
Generate CSS keyframe animations from presets like fade, slide, bounce, spin and pulse. Set duration, timing and iteration and copy the @keyframes code.
Animation settings
CSS
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-30px); }
}
.animated {
animation: bounce 1200ms ease-in-out infinite alternate;
}What is the CSS Animation Generator?
The CSS Animation Generator builds complete keyframe animations from ready-made presets — fade, slide, bounce, spin and pulse.
- Five presets: fade, slide, bounce, spin, pulse
- Duration, timing, iteration and direction controls
- Live animated preview
- Outputs both @keyframes and animation shorthand
- Infinite or fixed iteration counts
- 100% client-side and free
How to use the CSS Animation Generator
- 1
Choose an animation preset: fade, slide, bounce, spin or pulse.
- 2
Set the duration, timing-function, iteration count and direction.
- 3
Watch the live element animate with your settings.
- 4
Copy the generated @keyframes and animation CSS.
About the CSS Animation Generator
The CSS Animation Generator builds complete keyframe animations from ready-made presets — fade, slide, bounce, spin and pulse. Pick a preset, then tune duration, timing-function, iteration count and direction while a live element animates so you can see the result immediately.
It saves you from hand-writing @keyframes blocks and remembering the animation shorthand order. The output includes both the @keyframes rule and the animation property, ready to paste into any stylesheet.
All generation happens locally in your browser — free, private, and works offline once loaded.
Frequently asked questions
What is the difference between transition and animation in CSS?
A transition animates between two states and needs a trigger like :hover. An animation uses @keyframes to define many steps and can run automatically, loop, and play without any interaction. Animations are more powerful; transitions are simpler.
How do @keyframes work?
A @keyframes rule names an animation and lists style snapshots at percentages (0% to 100%, or from/to). The browser interpolates between those snapshots over the animation's duration to produce smooth motion.
How do I make an animation loop forever?
Set animation-iteration-count to infinite. This tool exposes an infinite option, and the copied CSS includes it in the animation shorthand so the effect repeats endlessly.
What does animation-direction do?
It controls playback order: normal plays forward, reverse plays backward, alternate plays forward then backward each cycle, and alternate-reverse does the opposite. alternate is popular for smooth back-and-forth pulses.
Are CSS animations better than JavaScript animations?
For simple, declarative motion CSS animations are lighter and run on the compositor thread, staying smooth even when the main thread is busy. JavaScript is better when you need dynamic values, physics or fine playback control.
Guides for CSS Animation Generator
Related tools
CSS Transition Generator
Build CSS transitions with property, duration, timing-function and delay controls. Hover the live preview to see the effect and copy the transition code.
CSS Transform Generator
Generate CSS transforms with sliders for translate, rotate, scale and skew. See a live preview of the transformed box and copy the transform code.
CSS Loader Generator
Generate pure-CSS loading spinners: ring, dots and bars. Control size, color and speed, preview the animation live, and copy the CSS including keyframes.
CSS Text Shadow Generator
Free CSS text shadow generator to build text-shadow effects with x/y offset, blur and color. Add a second layer for glow, neon or 3D, then copy the CSS.