CSS opacity Property Explained

What the CSS opacity property does, with an example.

Published November 5, 2026

The CSS opacity property sets the transparency of an element, from 0 (fully transparent) to 1 (fully opaque).

Key points

  • Check browser compatibility on a resource like caniuse.com if targeting older browsers

Example

opacity: 0.5;
More CSS articles