background
Description »This property is the shorthand for setting the background of an element. |
|
Possible Values »
- background: color position size repeat origin clip attachment image;
- Each sub-value corresponds with the background-property of the same name below. Note that these values can be in a different order, within reason, and that not all values need to be specified.
- background: none;
- Eliminates the background entirely.
- background: inherit;
- Inherits background values from parent element.
Details »
This single property name combines each of the background properties for convenience:
- background-color
- background-position
- background-size
- background-repeat
- background-origin
- background-clip
- background-attachment
- background-image
Note that not all of these sub-properties exist for older versions of browsers, particularly those that do no support CSS3.
In Practice »
Results | CSS |
Try it! | at The CSS Zone Sandbox |