Learn about the CSS implementation of background images in learning Web pages

Source: Internet
Author: User
css| Background Picture | Web page

Background picture background images has many properties to manipulate.
Fortunately, you can use background to handle all of the following:

Body {
Background:white URL (http://www.webjx.com/images/bg.gif) no-repeat top right;
}

The following attributes are merged:

Background-color appeared in front.

Background-image the location of the picture.

Background-repeat pictures in duplicate form. Background images can be repeated repeat (this is like building tiles), repeat-x on the x-axis (around) repeat, repeat-y in the y-axis (up and down) Repeat, no-repeat do not repeat only show one.

Background-position can use Top,center,bottom,left,right or any combination that can be seen, such as above on top.

You can set a background picture for most HTML elements, not just the entire page (body), which can be used to make simple but significant landscaping, such as rounded corners and different corner shapes.

Using the back image is very simple and can be used anywhere on the page. Many people like to use colorful pictures as the background of the page, bring to the user interpretation of the foreground text more difficult. This is an extreme example, but in fact most user-friendly, readable text is black on a white background or white on a black background (it is recommended to use a soft color as the background, to reduce the glare of the color).

So, the best place to use the background picture is either no content on the top or the background is very light, which also helps to reduce the size of the picture because it uses fewer colors. (It is recommended that you use an indexed color format, such as GIF)



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.