CSS Transition Generator
StylingEverything runs locally in your browser — nothing is uploaded
Pick the property, duration, easing and delay, hover the preview to watch it, then copy. A transition needs two states to be visible at all, so the preview adds a `:hover` rule as the trigger — a `transition` on a static element shows nothing. That also explains a common confusion: `transition` belongs on the element itself, not inside `:hover`. Put it in `:hover` and you get an animation on the way in and none on the way out, because the declaration is no longer in effect when the pointer leaves. The generated code keeps the two rules separate so the division of labour is obvious. Why a handful of easings instead of four numbers: the control points of `cubic-bezier(x1, y1, x2, y2)` need dragging to get right, which is the cubic-bezier tool’s job. What is here are the most used curves, each labelled with its character (`ease-out` starts fast and settles; `back` overshoots slightly) so you can choose with a reason. One practical note: keep the duration under 500ms. A transition explains what just happened; it is not a performance. Past half a second, people start waiting for it.
Features
- Six common properties: transform, opacity, background, shadow, blur, all
- Duration from 0 to 3000ms — 150–400ms is the comfortable range
- Six easing curves, each labelled with its character
- An adjustable delay, for staggering items as they enter
- Hover the preview to watch the transition; no button to press
- The output keeps `transition` and `:hover` as two separate rules
- A complete copyable CSS rule below, with a `.transition` selector
- Everything is computed in your browser
How to use
- Pick a property (transform or opacity is a good start)
- Adjust duration and easing, then hover the preview
- Add a little delay for a staggered entrance
- Copy the CSS — note that `transition` sits on the base rule and the changed value on `:hover`
FAQ
- Why does it animate on hover in but snap back on the way out?
- Almost certainly because `transition` is inside `:hover`. Written that way the declaration only applies while hovering, so on the way out it is gone and the browser has no transition to run — hence the snap. The fix is to put `transition` on the element’s base rule and only the changed value inside `:hover`. That is the structure this tool generates, if you want something to compare against.
- What is wrong with `transition: all`?
- Two things. Performance: `all` makes the browser watch every animatable property, including ones you never meant to move — some of which trigger layout or paint — which slows complex pages down. Surprise animation: a property changed elsewhere (a responsive width, a colour from a theme switch) transitions too, usually looking inexplicable. So list the properties explicitly; keep `all` for prototypes.
- Which properties are safe to animate?
- `transform` and `opacity` are the two accepted-safe ones — they can be handled entirely on the GPU compositor, with no layout and no paint. By contrast `width`, `height`, `top`, `left` and `margin` trigger layout, and `box-shadow` and `background-color` trigger paint; in quantity those drop frames. So prefer `transform: translate/scale` over animating `left`/`width`, which is why transform is the first option here.
- How long should the duration be?
- 150–400ms is the comfortable range for interface transitions: quick enough not to feel like waiting, slow enough to be seen. Under 100ms reads as instant (no transition perceived); past 500ms people start waiting. Two further rules of thumb: larger elements travelling further can take slightly longer (big things should move slower), and repeated interactions (hover, click feedback) should be shorter still, because they are seen constantly.
Related tools
CSS Keyframe Animations
StylingSeven keyframe presets — fade, slide, pop, pulse, shake, spin, float — with duration and easing, plus a reduced-motion fallback.
CSS Border Radius
StylingSet each corner radius, preview it live and copy the CSS. px, rem or percent — and the preview shows why a percentage gives an ellipse.
CSS Gradient Generator
StylingAdjust the angle, colours and shape, preview the gradient live, copy the CSS. Linear, radial and conic, with an optional middle stop.
Glassmorphism Generator
StylingAdjust blur, opacity, saturation and border, preview the glassmorphism live and copy the CSS, -webkit- prefix included so it works on iOS.
Neumorphism Generator
StylingAdjust distance, blur, intensity and direction to preview neumorphism and copy the CSS. Both shadow colours derive from the surface, hue intact.
Neon Text
StylingAdjust colour and intensity, preview the neon glow live and copy the CSS, with layered text-shadows on a dark backdrop.