liveBook · Manning

Background property

The CSS background shorthand property sets multiple background-related properties for an element in a single declaration.

How 2 Manning books explain it

Tiny CSS Projects

The CSS background property is a shorthand property for setting an element's background layers and related background properties.

How it is used
Combines an image, position, size, and fallback color when styling both sides of a credit card.
How deep it goes
Breaks down one shorthand declaration and explains image sizing and color fallback, without developing a full property reference.
Examples
Shows a photographic credit card, a radial-gradient profile card, a dark page background, and buttons with their default background removed.
What you can do after
Operate/configure it to position and size a card image over a fallback color, or remove a button’s default background.

Read how Tiny CSS Projects explains background property →

CSS in Depth, Second Edition

The CSS background shorthand property sets multiple background-related properties.

How it is used
Combines multiple background settings and supports solid colors, images, and gradients in CSS declarations.
How deep it goes
Defines eight constituent properties and reset behavior, then demonstrates gradients without detailing every constituent property.
Examples
Demonstrates a white-to-blue linear gradient on a fixed-size element using directional and degree notation.
What you can do after
Apply it via CSS while choosing between concise shorthand and safer individual declarations for complex backgrounds.

Read how CSS in Depth, Second Edition explains background property →

Related concepts

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.