liveBook · Manning

Opacity

Opacity is the visual property specifying how opaque or transparent a rendered element or color appears.

How 3 Manning books explain it

Web Design Playground, Second Edition

The CSS opacity property specifies the degree to which an element and its contents are transparent.

How it is used
Controls when photo-gallery captions and before-and-after portfolio images appear on hover.
How deep it goes
Demonstrates opacity values of 0 and 1 in CSS and animates their change with a transition; does not explain rendering internals.
Examples
Shows a thumbnail caption and a before-and-after book-restoration image overlay, each hidden initially and revealed on hover.
What you can do after
Build it from scratch: create captions or image overlays that appear on hover, with an optional animated opacity transition.

Read how Web Design Playground, Second Edition explains opacity →

CSS in Depth, Second Edition

The CSS opacity property specifies the compositing opacity of an element and its contents.

How it is used
Fades dropdowns and navigation labels into view as their states change.
How deep it goes
Defines the 0–1 range and works through a dropdown fade, its transparent click target, and a delayed-visibility fix.
Examples
Uses a dropdown that blocks a link while transparent, then pairs its fade with delayed visibility.
What you can do after
Build it from scratch: fade a dropdown while hiding its transparent drawer after the fade completes.

Read how CSS in Depth, Second Edition explains opacity →

Tiny CSS Projects

The CSS opacity property controls the transparency of an element and its rendered contents.

How it is used
Uses opacity to establish visual hierarchy and reveal secondary card content during hover and keyboard-focus interactions.
How deep it goes
Demonstrates concrete values and animated state changes, but does not develop opacity beyond these interface examples.
Examples
Uses summary-card content reveals and translucent credit-card labels as concrete applications.
What you can do after
Apply opacity to hide interactive content visually, animate reveals, and de-emphasize supporting labels.

Read how Tiny CSS Projects explains opacity →

Also covered in

What to know first

Related concepts

Questions about opacity

What is opacity?

Opacity is the visual property specifying how opaque or transparent a rendered element or color appears.

Which Manning books explain opacity?

Web Design Playground, Second Edition, CSS in Depth, Second Edition and Tiny CSS Projects.

What should I know before learning opacity?

Manning books that teach opacity usually introduce calc(), Document Object Model and JavaScript first.

What is the difference between opacity and display property?

Opacity is the visual property specifying how opaque or transparent a rendered element or color appears. The CSS property that specifies how an element generates boxes and participates in layout.

What is opacity a kind of?

Opacity is a kind of style property. A style property is a named setting or interface attribute that specifies or exposes a presentation characteristic of an element or view.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.