CSS Transition Generator
Generate a CSS transition — property, duration, delay and easing — with a hoverable live preview, then copy the shorthand, a full hover rule and the HTML. Includes a prefers-reduced-motion block.
Input
The preview applies a matching hover change for whichever property you pick.
Scale is a multiplier (1.1 = 110%); translate is in px; rotate is in degrees.
Output
Your transition preview will appear here.
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/css-transition-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"property": "background-color",
"duration": "300",
"delay": "0",
"timing": "ease",
"baseColor": "#3b82f6",
"hoverColor": "#8b5cf6",
"reducedMotion": "true"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `css-transition-generator` tool (CSS Transition Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/css-transition-generator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="CSS Transition Generator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
A CSS transition makes a property change gradually instead of snapping. This generator lets you choose what animates, how long it takes, when it starts and how it accelerates, then shows the result on a box you can hover, so you can tune it by feel before copying the CSS.
How to use it
- Choose the property to transition.
allanimates every changed property; naming one (such astransformorbackground-color) is faster and more predictable. - Set the duration and delay in milliseconds. 150-300 ms feels responsive for hover effects; longer values suit large movements.
- Pick the timing function.
ease-outsuits things entering,ease-inthings leaving,linearsuits colour fades and progress. Choose Custom cubic-bezier() to set the four control points yourself, orsteps()for a stepped effect. - Adjust the hover state (colours, and for
transformthe scale, move or rotate amount) and hover the preview. - Copy the one-line
transitiondeclaration, the full CSS rule or the HTML.
Good to know
- The transition is written on the resting state, so it plays both when the pointer enters and when it leaves. Put a different
transitionon:hoverif you want asymmetrical timing. - Only properties with a computable midpoint animate: colours, lengths, opacity, transforms, shadows and filters.
displayandheight: autodo not. - Prefer
transformandopacity: browsers can animate them on the GPU without re-laying out the page. - The generated CSS includes a
prefers-reduced-motionblock by default so people who ask for less motion get none. Untick it if you handle that elsewhere. - For a visual curve editor, try the CSS Cubic Bezier Generator.