CSS Property - Background

Value: <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>
Initial: not defined for shorthand properties
Applies to: all elements
Inherited: no
Percentage values: allowed on <background-position>

The CSS "background" property is a shortend version for setting the individual background properties in one string in a style sheet or as an inline style in a HTML document:

Values that can be used for the "background" property are set and restricted to the values from the individual background properties.


Single property:
background: white;

Multiple Properties:
background: url("image.png") top left repeat fixed #CCCCCC;

The "background" property sets all of the individual background properties. In the first example we have only set a value for the "background-color", the other properties are set to their initial value. In the second example all of the "background" properties have been used.