CSS property: background
The background property is a shorthand property used to set some or all of the background properties. Properties can be listed in any order.
Considerations
Do not set a background-attachment value unless you are applying the background property to the <body> element.
Property values
Value |
Description |
|---|---|
[ background-attachment | background-color | background-image | background-position | background-repeat ] |
This is a whitespace-separated list of values for the background-attachment, background-color, background-image, background-position, and background-repeat properties. You can set from one to five values. Properties can be listed in any order. See the descriptions of the individual properties for more information about valid values. |
inherit |
This value specifies that the element inherits the background property of the containing element. |