CSS BACKGROUND-IMAGE

The background-image property sets an image as the background. The background of an element is the size of that element, including padding and border, but not the element’s margin. Always set a background-color to be used if the image is unavailable.

The url indicated below, is the location of the image and must be enclosed in parenthesis and preceded by the url keyword. The url location can be a full URL to the image being used, or a partial URL. When used with a partial URL, the path is relative to the location of the actual document that contains such property.

Inherited: No

Example
1
2
3
4
body {
  background-image: url(stars.gif);
  background-color: #000000
}

Possible Values

url: The path to an image
none: No background image