Back to CSS1 Reference | CSS1 Properties
Next background-attachment
- Property
- background
- Values
- <background-color>, <background-image>, <background-repeat>, <background-attachment>, <background-position>
- Initial
- not defined for shorthand properties
- Inherited
- no
The 'background' property is a shorthand property for setting the individual background properties (i.e., 'background-color', 'background-image', 'background-repeat', 'background-attachment' and 'background-position') at the same place in the style sheet.
Possible values on the 'background' properties are the set of all possible values on the individual properties.
BODY { background: red }
P { background: url(chess.png) gray 50% repeat fixed }
The 'background' property always sets all the individual background properties. In the first rule of the above example, only a value for 'background-color' has been given and the other individual properties are set to their initial value. In the second rule, all individual properties have been specified.