Name

background-image

Values:

<uri> | none | inherit

Initial value:

none

Applies to:

All elements.

Inherited:

No.

Computed value:

Absolute URI.

Description:

This property places an image in the background of the element. Depending on the value of background-repeat, the image may tile infinitely, along one axis, or not at all. The initial background image (the origin image) is placed according to the value of background-position.

Examples:

body {background-image: url(bg41.gif);}
h2 {background-image: url(http://www.pix.org/dots.png);}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd Edition 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.