CSS transition: plainly explained.

A CSS transition animates a property from one value to another over a duration. The four transition properties, transition versus animation, best practices.

Design · Updated Nov 7, 2026

DEFINITION

A CSS transition smoothly animates a property from one value to another over a set duration, for example a colour or size change on hover.

CATEGORY

Design

RELATED

CSS animation

Summarize this page with AI

A CSS transition smoothly animates a change to a property, from one value to another, over a set duration instead of switching instantly. It is the simplest way to add motion to an interface, most often on a state change like a hover, focus or class toggle.

01

The four transition properties

A transition is controlled by four settings, usually written together in the transition shorthand, for example transition: background-color 200ms ease-in-out 0s;.

Property
transition-propertyRoleWhat to animateExamplebackground-color
transition-durationRoleHow long it takesExample200ms
transition-timing-functionRoleThe paceExampleease-in-out
transition-delayRoleWait before startingExample0s
02

What you can transition

Only animatable properties transition. Colours, opacity, transform, dimensions and positions all work; discrete properties like display do not (though modern CSS is adding support). Transitioning transform and opacity is the smoothest because the browser can offload them to the GPU.

03

Transition versus animation

A transition animates a single change between two states and needs a trigger, like a hover. A CSS animation uses keyframes, can define many steps, and can run on its own or loop. Use a transition for simple hover and focus effects, and an animation for multi-step or automatic motion.

04

Timing functions

The timing function shapes how the change accelerates. ease starts and ends softly, linear is constant, and a custom cubic-bezier() gives full control. Keep durations short, around 150 to 300 milliseconds, so the interface feels responsive rather than sluggish.

05

Best practices

Name the exact properties instead of using transition: all, which can animate unintended changes and hurt performance. Pair transitions with a clear hover or focus state, and respect prefers-reduced-motion for users who are sensitive to movement.

06

CSS transitions at BeBranded

At BeBranded we use transitions for crisp, subtle feedback on buttons, links and cards, so an interface feels alive without distracting. It is part of the polished, performant front-end we deliver through our design work.

FAQ

Questions about CSS transition.

Another question?

Write to us
What is a CSS transition?
A CSS transition smoothly animates a property from one value to another over a set duration, usually on a state change like a hover. It adds motion without switching instantly.
What is the difference between a transition and an animation?
A transition animates one change between two states and needs a trigger. An animation uses keyframes, can define many steps, and can run on its own or loop. Transitions suit simple hover effects.
Which properties can you transition?
Most animatable properties, such as colour, background, opacity, transform and size. Transitioning transform and opacity is the smoothest because the browser can offload them to the GPU.
What is a timing function?
A timing function sets the pace of a transition, for example ease, linear, ease-in-out or a custom cubic-bezier curve. It shapes how the change accelerates and decelerates.
Why is my CSS transition not working?
Common causes are a missing duration, a property that is not animatable (like display), or no change in value to animate. Check that the start and end states differ and a duration is set.
Does Webflow support transitions?
Yes. Webflow lets you add transitions in the Designer under a state like hover, which generates the matching CSS transition in the exported code.

Related

Related terms, and where to go next.

How to compare web design packages beyond the page count
Design

How to compare web design packages beyond the page count

Compare web design packages by scope, SEO, CMS, support and ownership, not page count. Use a practical framework before you sign.

Read the article
How to choose a web design agency that fits your growth stage
Design

How to choose a web design agency that fits your growth stage

Choose a web design agency by growth stage, scope, process, SEO, and support. Use a practical framework and checklist.

Read the article
Claude Design: what it changes for your website
AI & automation

Claude Design: what it changes for your website

Claude Design by Anthropic: what the tool actually does, its concrete limits, the pipeline to Webflow, and why a prototype is not a product.

Read the article

Let’s talk

Tell us what you want to build.

Thirty minutes with the people who will work on your project. You leave with a clear view of the scope, the timeline and the next steps.

What happens next

  1. 1A 30-minute callWe listen to your goals, your constraints and your context.
  2. 2A clear scopeWe map what is worth doing first, and what it takes.
  3. 3A costed proposalYou decide, with no commitment and no sales pitch.