SpeedDrain
Hardware Accelerated @keyframes Engine

CSS Keyframe Animation Generator

Craft expressive CSS3 keyframe animations with instant preview controls. Adjust timing curves, iteration counts, and delays, then copy clean production code.

✨

Interactive Preview

Pulse (Heartbeat)

Duration1.2s
Delay0s
Generated CSS Keyframes & Rules
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.animated-element {
  animation: pulse 1.2s ease-in-out 0s infinite normal both;
}

High Performance CSS Animation Principles

The Composite-Only Rule: 60 FPS Smoothness

Browsers execute three primary rendering pipeline phases: Layout (reflow), Paint, and Composite.

Animating geometric properties like width, height, top, or margin triggers browser reflow on every frame, producing noticeable stutter and battery drain on mobile.

Always favor transform (translate, scale, rotate) and opacity, which are handled directly on the GPU compositor thread without touching the CPU main thread.

CSS Animation Shorthand Syntax Demystified

The CSS animation property consolidates 8 distinct sub-properties into one line:

animation: [name] [duration] [timing-function] [delay] [iteration-count] [direction] [fill-mode];
  • fill-mode: forwards: Retains final keyframe styles (e.g. opacity 1) when playback ends.
  • direction: alternate: Reverses cycle order on even iterations for seamless back-and-forth loops.