Css/Properties/background-image
< Css | Properties
background-image
The background-image property sets the background image of an element.
Description
Values | <uri> | none | inherit |
---|---|
Initial value | none |
Applies to | All elements |
Inherited | No |
Point, Note
- When setting a background image, authors should also specify a background color that will be used when the image is unavailable.
Values
<uri>
none
If specified, no background image is displayed. This is default.
inherit
Example
Example A
[style.css]
body { background-image: url("images/bg.png"); background-position: bottom right; background-attachment: fixed; background-repeat: no-repeat; }
CSS Reference
The CSS specification defines the background-image property in 14.2.1 Background properties.