HTML Dog
Skip to navigation

CSS Property: background-image

The background image of a box.

Possible Values

ValueNoteExample
none
[URL]Location of an image file.url("imageFile.jpg")
[URL], [URL]Multiple background images can be separated by commas. The first image will be applied on top, “nearest” to the user. Subsequent images will be applied underneath the image that comes before it.url("upperImage.png"), url("lowerImage.png")
inherit
initial
unset

Example


#plow {
    background-color: #f80;
    background-image: url("imageFile.png");
}
/* Applies "imageFile.png" on top of an orange background. */

#authors {
    background-color: #fff;
    background-image: url("tom.jpg"), url("jane.jpg"), url("bozza.jpg");
}
/* Applies Tom on top of Jane on top of Bozza on top of a white background. */