What is the CSS Keyframe Builder?
Build multi-step CSS @keyframes animations with a timeline editor. Add keyframe stops, set properties at each step, and copy the complete animation code.
Everything runs locally in your browser. Adjust the controls above, preview instantly, and copy clean, production-ready CSS — no account, no upload.
Using the CSS Keyframe Builder
Everything lives in the panel at the top of this page. There is nothing to install — it all runs right here in your browser.
Add keyframe stops
Click Add Step to insert percentage stops on the timeline. The 0% and 100% stops are always present. Add 50% for midpoints, or any value you need.
Set property values at each stop
For each step, enter the CSS property values: transform, opacity, color, etc. Only include properties that change - the browser interpolates the rest.
Set animation timing
Enter a name, duration, easing, and iteration count. Copy the complete @keyframes block and animation declaration.
What the generated code looks like
Clean, production-ready CSS — no vendor bloat, no unnecessary declarations.
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.05); opacity: 0.8; }
100% { transform: scale(1); opacity: 1; }
}
@keyframes slideIn {
0% { transform: translateX(-100%); opacity: 0; }
60% { transform: translateX(10px); opacity: 1; }
100% { transform: translateX(0); opacity: 1; }
}
.badge { animation: pulse 2s ease-in-out infinite; }
.panel { animation: slideIn 0.4s ease-out both; }Name your keyframes descriptively (slideIn, fadeOut, pulse) rather than generically (animation1, anim). Good names make the CSS self-documenting.
Ready-to-use CSS patterns
Drop any of these straight into your project — no modifications needed.
Staggered entrance
One keyframe animation, delayed per item with a custom property — no JavaScript.
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.list > li {
animation: rise 400ms ease-out both;
animation-delay: calc(var(--i) * 80ms);
}
/* <li style="--i: 0">, <li style="--i: 1">, … */Pause until visible
Start paused and let a class (added by an IntersectionObserver) run the animation once it scrolls into view.
.reveal { animation: rise 600ms ease-out both paused; }
.reveal.is-visible { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
.reveal { animation: none; }
}Common mistakes & how to fix them
A few habits trip people up. Here is what to watch for — and the exact fix.
Element snaps back at the end
Without a fill mode the element returns to its original styles after the last keyframe.
Fix: Add animation-fill-mode: forwards (or both) so the final keyframe is kept.
Keyframes that animate layout
Animating left, top, width or height triggers layout on every frame and looks janky on mobile.
Fix: Express movement with transform: translate() and size changes with transform: scale().
Pro tips for better results
Only animate transform and opacity for performance
These are the only two properties composited by the GPU without triggering layout. Animating width, height, margin, or background causes jank at anything below 60fps.
Use from and to as aliases for 0% and 100%
from and to are valid in @keyframes as shorthand for 0% and 100%. Use them when you only have two stops for cleaner code.
animation-fill-mode: both freezes the start and end states
Without fill-mode, an animated element snaps back to its default state at the end. both applies the from styles before the animation and the to styles after it ends.
Frequently asked questions
From the blog
Read more →CSS Animations: A Practical Guide to Keyframes and Transitions (2026)
Learn the difference between transitions and keyframe animations, how to write @keyframes, the properties worth animating for 60fps, and easing that actually looks good.
CSS clamp() and Fluid Typography: Stop Writing Font-Size Media Queries (2026)
Learn how CSS clamp() creates type that scales smoothly between screen sizes with a single line, the formula behind it, and how to build a fully fluid type scale without media queries.
The Complete Guide to CSS Gradients (2026)
Master linear, radial, and conic CSS gradients. Learn color stops, angles, hard stops for stripes, multi-layer gradients, and the tricks behind smooth, professional results.