The Background image Background Images has many attributes that can be operated.
Fortunately, you can use background to process all:
The code is as follows: |
Copy code |
Body { Background: white url (/images/bg.gif) no-repeat top right; }
|
The following attributes are merged above:
Background-color appears in front.
The location of the background-image.
The format of the background-repeat image is repeated. Repeat can be repeated in the background image, repeat-x is repeated on the x axis (left and right), and repeat-y is repeated on the y axis (up and down, no-repeat is not repeated. Only one repeat is displayed.
You can use top, center, bottom, left, right, or any visible combination of background-position, for example, above.
You can set a background image for most html elements, not just the whole page (body). It can be used to make simple but significant beautification effects, such as rounded corners and other different corner shapes.
It is very easy to use a back image and can be used anywhere on the page. Many people like to use colorful pictures as background pages, which makes it difficult for users to interpret text at the front-end. This is an extreme example, but in fact, most of the texts that are user-friendly and readable are black on the white background or white on the black background (it is recommended that you use soft colors as the background, reduce the glare color)
Therefore, it is best to use the background image either with no content or with a very light background. This will also help reduce the image size, because less color is used. (The index color format, such as GIF, is recommended)