Free Online CSS Transition Generator with Cubic Bezier Curve
Choose the properties you really mean to animate instead of reaching for all, then set a duration, a delay and a timing function for each one separately. The cubic-bezier editor has four editable numbers and draws the curve, and the demo element runs the transition on hover and on a button press.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Build a CSS Transition
A few steps, and nothing is uploaded.
What to Know About CSS Transitions
Including why transition: all is a trap.
transition: all is a performance trap. It tells the browser to watch every animatable property on the element, including ones you never intended to change. A utility class that happens to alter a padding, a colour set by a theme switch, or a property changed by a library then animates as well, at the duration you picked for something else. It also makes the transition impossible to read later, because nothing in the rule says what is supposed to move. Naming the properties costs a few characters and removes a whole class of bug.
transform, opacity and, in current browsers, filter can be handled on the compositor, so the element is moved or faded without the page being laid out again. Animating width, height, top, left, margin or padding makes the browser recalculate layout on every single frame, and on a long list or a phone that is where dropped frames come from. If you can express the movement as a translate and a scale instead of a width and a left, do that.
display: none to display: block does not transition either, since the element was not being rendered a moment ago, and the same applies to height: auto and to any keyword with no numeric midpoint. Use max-height, a transform, or the newer allow-discrete behaviour instead of expecting auto to tween.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the CSS Transition Generator
A transition is four pieces of information repeated for each property: what changes, how long it takes, how it is eased, and whether it waits first. Written out that way it is easy. The trouble starts when someone writes transition: all .3s because it is shorter, and then spends an afternoon working out why a menu opening also makes the background colour crawl.
This page makes naming the properties the easy path. The chips are the properties that actually get animated in real interfaces, and each one is marked according to whether the browser can move it on the compositor or has to lay the page out again. Turn on the per property switch and every chip you ticked gets its own duration, delay and easing, which the shorthand supports and almost nobody uses.
The cubic-bezier editor was the part worth doing carefully. The four numbers mean very little on their own, so the curve is drawn as an SVG with the control points and their handles shown, the time axis marked, and the y values allowed to go outside 0 to 1 so that an overshoot can be built deliberately rather than stumbled upon. The demo element then runs the real declaration, on hover and on a class toggle, because a transition that feels right on hover often feels slow on a click.
Frequently Asked Questions
Easing, per property timing, compositing and what will not animate.
transform, opacity and usually filter are handled by the compositor and do not force a layout pass. Colours and shadows are cheap-ish but still cause painting. width, height, top, left, margin and padding force layout on every frame. A slide is almost always better done as transform: translateX() than as left.display: none to visible in the same frame, so there is no starting value to animate from. Adding the element and its final state in one go has the same problem. Either set the starting state, force a frame, or use transition-behavior: allow-discrete with @starting-style in browsers that support it.