Developer tool

CSS Animation Generator

Pick a motion, adjust its timing and preview it before copying the CSS.

Runs in your browser. No upload.
Preview

About this tool

CSS Animation Generator made simple.

The preview uses CSS in this page. It does not run scripts or upload your code. Check reduced-motion needs before using an animation on a live site.

Guide

Using CSS Animation Generator

CSS Animation Generator writes a small @keyframes block and an animation rule for a preset motion. You pick one of five effects, set the duration, delay, number of repeats and easing, watch a box play the motion, and copy the CSS. It does not make custom keyframes, run any script of yours or add support for people who prefer less motion.

How to use it

  1. Choose an effect: Fade in, Slide from left, Bounce, Rotate or Pulse. The preview box plays it right away.
  2. Set the duration from 0.2 to 5 seconds, the delay from 0 to 3 seconds, the number of repetitions (1, 2, 3 or infinite) and the timing: ease, ease in, ease out, ease in-out or linear.
  3. Press Replay preview to watch it again. The CSS box shows the keyframes under the name usefulverse-motion and a rule for the class .my-element.
  4. Press Copy CSS and paste it into your stylesheet. Rename the keyframes or the class if you like, and read the notes below about delay and reduced motion.

Worked examples

The default fade

You enter
Effect
Fade in
Duration
0.8
Delay
0
Repetitions
1
Timing
ease
You get
Css
@keyframes usefulverse-motion { from { opacity:0; } to { opacity:1; } } .my-element { animation: usefulverse-motion 0.8s ease 0s 1; }

The fade moves opacity from 0 to 1. The shorthand reads name, duration, timing, delay and repeat count in that order, so the 0.8s is the duration and the 0s is the delay.

Run through the tool’s own code.

An endless bounce with a delay

You enter
Effect
Bounce
Duration
1.5
Delay
0.5
Repetitions
Infinite
Timing
ease-out
You get
Css
@keyframes usefulverse-motion { 0% { transform:translateY(-18px); } 65% { transform:translateY(5px); } 100% { transform:translateY(0); } } .my-element { animation: usefulverse-motion 1.5s ease-out 0.5s infinite; }

The element starts 18 pixels up, dips 5 pixels below its place at 65% of the time and settles at 0. Because the repeat count is infinite, the whole 1.5 s run loops forever after the half-second wait.

Run through the tool’s own code.

The slowest, longest setting

You enter
Effect
Rotate
Duration
5
Delay
3
Repetitions
3
Timing
linear
You get
Css
@keyframes usefulverse-motion { from { transform:rotate(-12deg); } to { transform:rotate(0deg); } } .my-element { animation: usefulverse-motion 5s linear 3s 3; }

Five seconds and a three-second delay are the top of the allowed ranges. Three repeats of a five-second run take 15 seconds, and the first starts after 3 seconds.

Run through the tool’s own code.

When it helps

  • Add a gentle entrance to a card, banner or button on a web page.
  • Draw attention to a small badge with a short pulse.
  • Learn how duration, delay, repeat count and easing change a CSS animation.
  • Get a clean starting rule and keyframes to adapt in your own stylesheet.

Limits to keep in mind

  • There are five fixed motions. You cannot edit keyframe steps, add colours or combine two effects.
  • Duration runs from 0.2 to 5 seconds and delay from 0 to 3 seconds. Repeats are 1, 2, 3 or infinite.
  • The copied CSS has no animation-fill-mode. The preview box holds its first and last frame, so with a delay the live element may look different from the preview until the animation starts or after it ends.
  • The CSS includes no prefers-reduced-motion rule. You must add your own for people who ask their device for less motion.
  • The class name .my-element and the keyframes name usefulverse-motion are fixed in the output.

Tips

  • Add animation-fill-mode: both to your rule if you want the first frame shown during the delay and the last frame kept after the end.
  • Wrap your animation in a prefers-reduced-motion check, or switch it off for visitors who ask for it.
  • Avoid infinite motion on large areas of a page, since it can distract and tire some readers.

Sources

Common questions

About CSS Animation Generator.

What does the animation shorthand contain?

The generated rule gives, in order, the keyframes name, the duration, the timing function, the delay and the iteration count. All are standard values of the CSS animation property, which you can also write as separate properties if you like.

Why does my live element behave differently from the preview?

The preview box uses a fill mode that keeps the first and last frames. The copied rule does not add one. With a delay, the real element shows its normal look until the animation begins, and after the end it returns to its normal look.

How do I respect people who want less motion?

Add a prefers-reduced-motion media query that turns the animation off or shortens it. The generator does not write one. Moving or flashing content that starts on its own and lasts over five seconds should also be easy to pause or hide.

Can I change the class or keyframes name?

Yes, after you copy it. Rename .my-element to your own class and rename usefulverse-motion in both places, the @keyframes line and the animation rule. The names in the output are only placeholders.

What do the timing options mean?

They set how speed changes. Ease starts slow, speeds up and slows down. Ease in starts slowly, ease out ends slowly, ease in-out does both, and linear keeps a steady speed throughout the run.

Does the tool run my CSS or upload it?

The preview uses CSS that is already on the page, and the tool does not take your own code. Nothing you choose is sent anywhere. The Copy button uses your browser's clipboard, and if that is blocked you can select the text yourself.

Which browsers support this CSS?

CSS animations and the @keyframes rule are supported in current major browsers. Check the compatibility tables on MDN for the exact properties if you must support very old browsers.

How do I use CSS animation generator?

Pick a motion, adjust its timing and preview it before copying the CSS.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.