HTML and CSS Reference
In-Depth Information
Figure 8-2. It's important to provide a fallback background color for IE 6-8
Using Background Images
The remaining background properties deal with adding and controlling the behavior of background images.
There's also the background shorthand property, which allows you to define all aspects of an element's
background (including color) in a single declaration. First, let's look at how you add background images.
Adding Background Images
he background-image property defines the source of an element's background image(s). It accepts two possible
values, namely:
url() The path to the image goes between the parentheses as described in “Specifying
Background Images and Other Files” in Chapter 3 .
none No background image. This is the default value.
All browsers in widespread use—with the exception of IE 8 and earlier—support multiple background
images on the same element. To specify more than one image, separate each url() value with a comma. If the
background images overlap, the first one is drawn on top with each subsequent one behind the previous one.
Search WWH ::

Custom Search