Приглашаем посетить
Чулков (chulkov.lit-info.ru)

Setting background-repeat

Previous Page
Table of Contents
Next Page

Setting background-repeat

The background image in this lesson is now repeating across the screen. This can be controlled using background-repeat.

Values for the background-repeat property (see Figure 6.2) include repeat (where the image is repeated both horizontally and vertically), repeat-x (where the image is repeated horizontally only), repeat-y (where the image is repeated vertically only), and no-repeat (where the image is not repeated).

Figure 6.2. Screenshot of <body> styled with background-repeat.

Setting background-repeat


In this lesson, you will use repeat-y, as shown in Listing 6.4, to force the image to repeat vertically down the page.

Listing 6.4. CSS Code Setting background-repeat
body
{
    background-image: url(chapter6.jpg);
    background-repeat: repeat-y;
}


Previous Page
Table of Contents
Next Page