Background shorthand property sets all background properties in one declaration.
All browsers support the background attribute.
Note: IE8 and earlier browsers do not support multiple background images for one element.
Note: IE7 and earlier browsers do not support "inherit". IE8 requires !DOCTYPE. IE9 supports "inherit".
can set the following attributes:
?background-color
?background-position
?background-size
?background-repeat
?background-origin
? background-clip
?background-attachment
?background-image
If you don’t set one of the values, there will be no problem, such as background:#ff0000 url('smiley.gif' ); is also allowed.
It is generally recommended to use this attribute instead of using individual attributes individually, as it is better supported in older browsers and requires fewer letters to be typed.
Example:
body
{
background: #00FF00 url(bgimage.gif) no-repeat fixed top;
}