Tips: Use CSS to define the background of a Web page.

Source: Internet
Author: User
Tags define
css| Skills | Web page Background | problem

This is often written when we define a background style:

body{
Background:url (img/header_top.gif) left top no-repeat;
}

If we want to define a background color, but also add color in the background, but note that if you want to use Background-color this style, please do not put this style before the background is not like this:

body{
background-color:red;
Background:url (img/header_top.gif) no-repeat left top;
}

The result is no background red only show a picture, what this thought is a bug, carefully think to understand the reason. Because the background color in the background style is not defined, it is colorless by default. Because the first line defines a red, the second line defines a colorless, so the second line is colorless.
Later define background must pay attention to this small problem.



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.