The background properties set aspects of the background of an element, that is, the surface onto which text is displayed. That background can be either transparent, a color, or an image. You can also set the position of an image, if and how often the image should be repeated on the screen, and whether it should be fixed or scrolled relative to the canvas. Five of the properties set specific aspects of the background, while the sixth, the background property, is a shorthand method that lets you set all the first five properties at one time. The properties do not inherit. The following are the background properties:
We discuss each of these in the following sections. |