Transition Shorthand Property

Last updated: 2026-09-13

transition Transition Shorthand Property

The transition property is a shorthand for transition-property, transition-duration, transition-timing-function, and transition-delay. It enables smooth, animated changes between property values when an element changes state — for example on :hover or :focus — instead of abrupt jumps. By specifying the target property, duration, easing curve, and delay, you can easily create fluid interaction effects. It is a fundamental tool for building modern web micro-interactions.

Category
Initial Valueall 0s ease 0s
InheritedNo
Applies Toall
Animation Typeshadow
CSS VersionCSS3
StatusStandard

📝 Syntax

transition: [ none | <single-transition> ]#;
/* <single-transition> = [ <property> | none ] || <time> || <easing-function> || <time> */

⚙️ Values

ValueTypeDescription
<single-transition>#ValueTransition shorthand: property, duration, timing function, delay

▶ Example

Edit the code below and see the live result in the playground:

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
transition v26 v12 v16 v6.1 v12.1
Supported in all major browsers
Tip: If the timing function is omitted, it defaults to ease; if the delay is omitted, it defaults to 0s. Multiple transitions are comma-separated so different properties can each have their own transition settings.
Warning: Not every property can be transitioned. Only properties with intermediate values — such as color, opacity, and transform — can animate; discrete properties like display cannot be transitioned.

❓ FAQ

QWhat is the difference between the transition and animation CSS properties?
Atransition needs a trigger such as :hover or :focus to play, and it moves between exactly two states: the starting and the ending value. animation works with @keyframes to define any number of keyframes, and can play automatically, loop, run in reverse, and be paused — it is far more powerful. In short: use transition for state changes and animation for complex sequenced motion.
QHow do I apply transitions to only some CSS properties and not others?
AList the properties you want to animate with transition-property, for example transition-property: background, transform;. If you do not specify it, the default is all, so every animatable property takes part in the transition, which can produce unexpected animation and unnecessary performance cost. It is best to declare the properties explicitly.
QWhy is my CSS transition not working and how can I fix the problem?
AFour common causes: the target property itself is not animatable (such as display or font-family); the starting or ending value is missing, so the browser has nothing to interpolate between; the transition is declared inside the pseudo-class where the state changes instead of on the element itself; or the shorthand order is wrong — duration must come before delay.
QMy transition is janky. Which properties are bad to transition?
ADo not transition properties that trigger reflow and repaint, such as width, height, top, left, margin, and font-size. Instead, prefer transform and opacity, which run on the compositor thread and are handled by the GPU, staying smooth at 60fps. If needed, add will-change to create a compositor layer in advance.

📚 Related Tutorials

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏