Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The CSS background properties provide a fine-grained control over the presentation of backgrounds in a web document, which allows interesting aesthetic possibilities. To recap, in this chapter you learned the following:
You can specify a solid background color by using the background-color property.
You can use the background-image property to provide a background image that tiles all the space available to it by default.
You can use the background-repeat property to control the tiling of background images. This can be limited to the x-axis or the y-axis, or you can use the no-repeat keyword to prevent the background image from tiling.
You can use the background-position property to position the background image.
You can use the background-attachment property to control whether a background image scrolls with a page or remains fixed in place. If the image is fixed in place, it becomes positioned relative to the browser window itself instead of the element it is applied to.
You can use the background shorthand property to put the control of all five properties into one property.