O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

background-image

Values:

<bg-image> [ , <bg-image> ]*

Expansions:

<bg-image>

<image> | none

Initial value:

none

Applies to:

All elements

Inherited:

No

Computed value:

Absolute URI

Description:

Places one or more images 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), url(bg43.png),
     url(bg51.jpg);}
h2 {background-image: url(http://www.pix.org/dots.png);}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required