On this page
  1. transition
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

transition

Prev: `opacity` | Up: motion | Next: `animation`
Rel: motion, Custom Properties & Animation Guide
Ref: MDN Web Docs — transition
Tags: #public #web #css #properties #motion #tier/core


Syntax & Overview

transition: transform 150ms ease, opacity 150ms ease;

Smoothly interpolates property changes between states.

Notes & Best Practices

Example

.btn {
  transition: background-color 150ms ease, transform 120ms ease;
}
.btn:active { transform: scale(0.98); }

Linked from

Related notes