B.5. background-image

This property sets the background image for an element. By default, element backgrounds are transparent, so the background image will show through nested elements, unless they have been assigned background colors or images of their own.

The positioning and tiling of a background image may be customized with the background-position and background-repeat properties, respectively.

Inherited: No

See also: Section B.3background-attachment, Section B.3background-color, Section B.6background-position, Section B.8background-repeat

B.5.1. Value

A URL or none. In CSS, URLs must be surrounded by the url() wrapper, not quotes. See the examples below.

Initial value: none

B.5.2. Compatibility

CSS Version: 1

Works in all CSS-compatible ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.