background
is shorthand property for the following:
- background-color
- background-image
- background-repeat
- background-attachment
- background-position
You can detailed info on every property here
Properties order
In most of browser implementation (i think maybe older browser could present issues) the order of the properties does not matter, except for:
background-origin
and background-clip
: when both of this properties are present, the first one refer to -origin
and the second to -clip
.
Example:
background: content-box green padding-box;
Is equivalent to:
background-origin: content-box;
background-color: green;
background-clip: padding-box;
background-size
must always follow background-position
and the properties must be separated by /
if background-position
is composed by two numbers, the first one is the horizontal value and the second the vertical value.