Small tip: Priority under the "HTML" body

Source: Internet
Author: User
Transduction
Met *{background: #00f;}
Body {background: #999;}

The idea at the time was the priority of these two roles? (wildcard character is higher than body).
The former wildcard purge (add) style (which is now generally not popular in this way because of the increased client burden, the browser rendering slows down), the latter to the Body Purge (add) style.

Put the above code into the browser (ie, FF and Google) rendered:



Wildcard rendering is not useful:





But it's not finished ...

Silently add Body{background: #999; border:20px solid #0C0}, originally I want to see is border will fill "body" around, but no:



Why is it? Do not understand the first Baidu.
And then found Zhang Xin Xu This article writes: By default, the body is not a height 100% display.
Retrace, the priority scope of HTML, wildcard, and body nodes is tested, and htm> wildcard >body nodes.

Details poke Zhang Xin Xu this article.

Small tip: Priority under the "HTML" body

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.