←
Design

CSS Animation Generator

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

Build @keyframes with live preview

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Offline use
Works without a connection once this page has loaded
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About CSS Animation Generator

CSS Animation Generator builds a @keyframes animation and the animation rule that plays it, while a sample box or text shows the result live. Start from one of 20 presets, including fade in and out, slide in from each side, zoom, bounce, shake, pulse, heartbeat, spin, flip, swing, wobble, rubber band and jello, then edit any keyframe: its percentage, translate X and Y in px or %, scale X and Y, rotate, 3D rotate Y, skew, opacity and, if you turn it on, background color.

Set the duration, delay, timing function (ease, linear, ease-in-out, a custom cubic-bezier() or steps()), the number of iterations or infinite, the direction and the fill mode, and pick a transform origin for swinging or flipping effects. The generated CSS writes every animated property in every keyframe, so the browser interpolates exactly what you see, groups identical keyframes like 0%, 100%, and can add a prefers-reduced-motion rule that turns the animation off for people who ask for less motion. If your own system asks for reduced motion, the preview only plays when you press Replay.

CSS Animation Generator runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use CSS Animation Generator

  1. Choose a starting point under Presets, for example Bounce or Fade in.
  2. Click a percentage under Keyframes to edit it, move the sliders for translate, scale, rotate, skew and opacity, or use Add keyframe and Duplicate.
  3. Set Duration, Delay, Timing function, Iterations, Direction and Fill mode under Timing.
  4. Watch the preview, press Replay to run it again, then rename the animation and click Copy CSS.

Frequently asked questions

How do I use the generated CSS?

Paste it into your stylesheet and add the class to an element, for example <div class="bounce">. The @keyframes block defines the motion and the class applies it with the animation shorthand: name, duration, timing function, delay, iteration count, direction and fill mode.

What does fill mode do?

It decides which keyframe applies outside the running time. forwards keeps the last keyframe after the animation ends, backwards applies the first keyframe during the delay, both does both, and none returns the element to its normal style. Entrance animations such as fade in usually need both so the element does not flash before it starts.

Which properties are best to animate?

transform and opacity. Browsers can run them on the compositor without recalculating layout, so they stay smooth even on phones. Animating width, height, top or margin forces layout on every frame. Background color is fine for small elements.

Why does the tool add a prefers-reduced-motion rule?

Some people get dizzy or nauseous from motion and turn on Reduce motion in their operating system. The @media (prefers-reduced-motion: reduce) rule switches the animation off for them. You can turn the option off if your animation is essential and subtle.

What is the difference between steps() and cubic-bezier()?

cubic-bezier(x1, y1, x2, y2) shapes a smooth acceleration curve; the x values must be between 0 and 1, y values can go beyond to overshoot. steps(n) jumps between n discrete positions without in-between frames, which suits sprite-sheet animations and ticking clocks.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it