The relationship of Html,body

Source: Internet
Author: User

First, one diagram.

The bottom one is the canvas, the upper layer is the HTML structure, and the upper layer is the body structure.

By default, the height of html,body is 0, you give these two elements to add a border can be seen, to pay special attention to the background color is not visible, this is due to the canvas, HTML and body of the inverse inheritance has a relationship, to the body set the background color will be HTML, Canvas is inherited to, although the canvas, HTML is the root element

When the height of the html,body is set to 100%, the size is the size of the browser viewport, and the value of the Zoom browser changes

Html,body's Overflow:hidden has the effect of freezing the form (regardless of the height setting of the value), after setting no matter how long the width of the page scroll bar all disappears (IE7 the following body Overflow:hidden no this ability)

The height value of body set to 100% is affected by HTML

The relationship of 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.