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

opacity

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


Syntax & Overview

opacity: 0.85;

Sets element transparency (0 to 1), animated directly on the GPU compositor.

Notes & Best Practices

Example

.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

Linked from

Related notes