The background property is a so called shorthand property that is used to set background-color, background-image, background-attachment, background-position and background-repeat properties at the same place.
Before applying the background property all background-related properties are first reset to their default values.
The background property contains following information:
- value: [<'background-color'>, <'background-image'>, <'background-attachment'>, <'background-position'>, <'background-repeat'>] or inherit;
- initial: depends on individual properties;
- applies to: all elements;
- inherited: no;
- percentages: allowed on background-position;
- media: visual;
- computed value: depends on individual properties.
If a value is not mentioned that should set that property to its initial value.
Example
CSS background property example:
Comments
No comments have been made yet.
Please login to leave a comment. Login now