The Background Properties


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:

  • background-color

  • background-image

  • background-repeat

  • background-attachment

  • background-position

  • background

We discuss each of these in the following sections.



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net