CSS transition-delay Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Animation & Motion

What You’ll Learn

The transition-delay property controls when a CSS transition starts — after a property changes. Use it to pause before motion begins or to stagger multiple elements.

01

Wait time

Delay before start.

02

Time units

Seconds and ms.

03

Shorthand

Last value in transition.

04

Stagger

Cascade menu items.

05

Tooltips

Avoid instant flashes.

06

UX care

Keep delays reasonable.

Introduction

The transition-delay property in CSS is used to specify the amount of time to wait before the transition effect starts. This property is useful for creating smoother animations and for controlling the timing of transitions on your web page. By adjusting the transition-delay, you can create more dynamic and visually appealing effects for your users.

Definition and Usage

Set transition-delay on the same element where you define transition or transition-property. The delay applies when a property value changes — for example, when the user hovers over an element or when a class is toggled.

💡
Beginner Tip

Delay does not change how long the animation takes — that is transition-duration. Delay only waits before the transition begins.

📝 Syntax

The syntax for the transition-delay property is straightforward. It can be applied to any element that supports transitions.

syntax.css
element {
  transition-delay: time;
}

Here, time can be specified in seconds (s) or milliseconds (ms).

Basic Example

transition-delay.css
.box {
  transition: background-color 1s;
  transition-delay: 2s;
}

.box:hover {
  background-color: red;
}

Syntax Rules

  • Time values must use s (seconds) or ms (milliseconds).
  • Default is 0s — no wait before the transition starts.
  • You can also set delay as the fourth value in the transition shorthand.
  • Comma-separated values match multiple transitions when used with multiple properties.
  • The property is not inherited.

Related Properties

  • transition — shorthand for all transition longhands
  • transition-duration — how long the transition runs
  • transition-property — which properties animate
  • transition-timing-function — speed curve during the transition
  • animation-delay — delay for @keyframes animations

🎯 Default Value

The default value of the transition-delay property is 0s, meaning the transition starts immediately when the property value changes.

⚡ Quick Reference

QuestionAnswer
Default value0s
Wait 2 secondstransition-delay: 2s;
Short delaytransition-delay: 200ms;
In shorthandtransition: opacity 0.3s ease 0.5s;
Stagger itemsDifferent delay per :nth-child()
InheritedNo

💎 Property Values

The transition-delay property accepts time values.

ValueExampleDescription
time2s or 200msSpecifies the amount of time to wait before the transition effect starts. Use seconds (e.g., 2s) or milliseconds (e.g., 200ms).
0s 200ms 0.5s 2s

When to Use transition-delay

transition-delay helps you control timing and sequencing of visual changes:

  • Staggered reveals — Menu items or list rows appear one after another.
  • Delayed tooltips — Wait briefly before showing a tooltip to avoid flicker on quick mouse movement.
  • Sequential hover effects — Background changes after a short pause for emphasis.
  • Exit timing — Different delays on hover-in vs hover-out (set on base and hover rules).

👀 Live Preview

Hover the box below — the color change waits 1 second before starting:

transition-delay: 1s

Hold hover to see the delayed color shift.

Examples Gallery

In this example, we’ll create a simple transition effect where the background color of a div changes after a delay of 2 seconds when the user hovers over it.

📜 Core Patterns

Learn delay as a longhand property and inside the transition shorthand.

Example 1 — Box with 2 second delay

In this example, we’ll create a simple transition effect where the background color of a div changes after a delay of 2 seconds when the user hovers over it.

index.html
<style>
  .box {
    width: 100px;
    height: 100px;
    background-color: blue;
    transition: background-color 1s;
    transition-delay: 2s;
  }
  .box:hover {
    background-color: red;
  }
</style>

<div class="box"></div>
Try It Yourself

How It Works

On hover, the browser waits 2s, then animates the background from blue to red over 1s (duration).

Example 2 — Delay in the transition shorthand

Include delay as the fourth value: property duration timing-function delay.

shorthand.css
.pill {
  transition: background-color 0.4s ease 0.5s;
}

.pill:hover {
  background-color: #059669;
}
Try It Yourself

How It Works

The last value in the shorthand (0.5s) is the delay. Order matters: duration comes before delay.

📄 UI Patterns

Use staggered delays and short waits for polished interactive components.

Example 3 — Staggered menu reveal

Give each menu item a slightly longer delay so they appear in sequence on hover.

stagger.css
.menu-item {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.menu:hover .menu-item { opacity: 1; }

.menu-item:nth-child(1) { transition-delay: 0s; }
.menu-item:nth-child(2) { transition-delay: 0.1s; }
.menu-item:nth-child(3) { transition-delay: 0.2s; }
Try It Yourself

How It Works

Each child gets an increasing transition-delay, creating a cascade without JavaScript.

Example 4 — Delayed tooltip appear

Add a short delay before a tooltip fades in so it does not flash when the cursor passes over quickly.

tooltip.css
.tooltip {
  opacity: 0;
  transition: opacity 0.2s ease;
  transition-delay: 0.4s;
}

.wrap:hover .tooltip {
  opacity: 1;
}
Try It Yourself

How It Works

The 0.4s delay prevents tooltips from appearing on accidental quick hovers, improving usability.

♿ Accessibility

  • Keep delays short — Long waits on essential feedback frustrate users, especially keyboard and screen reader users.
  • Do not hide critical info behind delay — Error messages and form validation should appear immediately.
  • Reduced motion — Set transition-delay: 0s when prefers-reduced-motion: reduce is active.
  • Focus parity — Apply the same delayed effects on :focus-visible, not hover alone.

transition-delay in the shorthand

You can write delay as a separate property or as the fourth value in transition. Both approaches produce the same result.

compare-delay.css
/* Longhand */
.box {
  transition: opacity 0.3s ease;
  transition-delay: 0.5s;
}

/* Shorthand equivalent */
.box {
  transition: opacity 0.3s ease 0.5s;
}

🧠 How transition-delay Works

1

Transition is configured

Set property, duration, timing, and delay on the element.

Setup
2

Property value changes

Hover, focus, or a class toggle updates a CSS property.

Trigger
3

Browser waits

The delay timer runs for the specified transition-delay time.

Wait
=

Transition runs

After the wait, the property animates over the transition duration.

Browser Compatibility

The transition-delay property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.

Modern browsers · Widely supported

Delayed transitions everywhere

transition-delay works in current Chrome, Firefox, Safari, Edge, and Opera alongside other transition properties.

98% Browser support
Google Chrome 26+ · Desktop & Mobile
Full support
Mozilla Firefox 16+ · Desktop & Mobile
Full support
Apple Safari 6.1+ · macOS & iOS
Full support
Microsoft Edge 12+ · All versions
Full support
Opera 12.1+ · All versions
Full support

Testing tip

Test staggered delays on mobile; touch devices may not trigger hover, so provide tap or focus alternatives.

transition-delay property 98% supported

Bottom line: transition-delay is safe to use for timed transition effects in modern browsers.

Conclusion

The transition-delay property is a powerful tool for web developers looking to create timed transitions and animations.

By adjusting the delay, you can control the timing of your effects, making your web pages more engaging and visually appealing. Experiment with different delay times and see how this property can enhance the user experience on your website.

💡 Best Practices

✅ Do

  • Use short delays (100–400ms) for tooltips and stagger effects
  • Pair with transition-duration for full timing control
  • Use :nth-child() for staggered list or menu reveals
  • Set delay on the base state so reverse transitions behave predictably
  • Respect prefers-reduced-motion: reduce

❌ Don’t

  • Delay critical error or success feedback
  • Use multi-second delays on primary interactive controls
  • Confuse delay with duration — they control different things
  • Rely on hover-only delayed effects without keyboard alternatives

Key Takeaways

Knowledge Unlocked

Five things to remember about transition-delay

Use these points when timing your CSS transitions.

5
Core concepts
🕐 02

Default 0s

No wait.

Default
📈 03

s and ms

Time units.

Values
📚 04

Shorthand

Fourth value.

Syntax
📦 05

Stagger

Sequence UI.

Pattern

❓ Frequently Asked Questions

transition-delay sets how long to wait before a CSS transition starts after a property value changes, such as on hover or focus.
The default is 0s, which means the transition starts immediately with no wait time.
Yes. You can use seconds like 2s or milliseconds like 200ms. Both are valid time units.
transition-delay applies to CSS transitions triggered by property changes. animation-delay applies to @keyframes animations.
No, transition-delay is not inherited. Set it on each element that needs a delayed transition.

Practice in the Live Editor

Open the HTML editor and experiment with transition-delay on hover effects.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful