Appendix A. Property Reference
Visual Media
background
This is a shorthand method to express all of the individual background properties within a single declaration. Use of this property is generally encouraged over the individual properties, as it has a slightly better support profile in older browsers and doesn’t take as long to type.
- Values:
[ <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position> ] |
inherit
- Initial value:
Refer to individual properties
- Applies to:
All elements
- Inherited:
No
- Percentages:
Values are allowed for <background-position>
- Computed value:
See individual properties
background-attachment
This property defines whether the background image scrolls along with the element when the document is scrolled. This can be used to create “aligned” backgrounds; see Chapter 9 for more details.
- Values:
scroll
|fixed
|inherit
- Initial value:
scroll
- Applies to:
All elements
- Inherited:
No
- Computed value:
As specified
background-color
This sets a solid color for the background of the element. This color fills the content, padding, and border areas of the element, extending to the outer edge of the element’s border. Borders that have transparent sections, such as dashed borders, will show the background color through the transparent sections.
- Values:
<color> |
transparent
|inherit
- Initial value:
transparent
- Applies to:
All elements
- Inherited:
No
- Computed value:
As specified
background-image
This places an image ...
Get CSS: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.