IE Haslayout Learning Related Records

Source: Internet
Author: User

1 The origin of haslayout (simple comprehension):

In IE, displaying the rendering engine's handling of elements by default is that each element should have the ability to calculate its own location, but this can obviously cause performance problems, so ie compromises a bit and establishes a property called Haslayout to indicate whether the current element is being evaluated by its own location. , for elements that do not need to be evaluated for layout and position, it is dependent on the block containing elements for calculation, which obviously reduces the amount of computation in the browser rendering and improves rendering speed;

2 haslayout features:

This attribute has some features:

For example: A single trigger, that is, as long as the trigger, it can not be set to false;

Haslayout is a CSS property;

It can not be set directly through the CSS, but indirectly set up, such as the ability to set zoom:1, and so on (below will be detailed instructions on how to trigger even if haslayout:true;)


3 General performance characteristics of bugs due to defects or incompatibility of haslayout attributes:

• After the current element has been set to float (that is, out of the document flow), the following elements should have moved forward, but the floating elements shown in IE still occupy a bit, giving the illusion that there is no floating (out of the document Stream), which is generally because of the haslayout attribute of this element =true ; causes this element to recalculate the layout;

• Height collapse problems, such as setting up a floating or absolute positioning of the child elements, causing the container parent element of the height of the problem; Have a hair relationship with haslayout? )

4 How do I trigger the Haslayout property to True?

First of all, some elements of the haslayout equal to True (ie, the official thought that these elements should be independent of their own layout calculation;)

HTML Body table tr TD th IMG HR input button Select textarea fieldset legend iframe Embed (is this a thing?) Check it out ... Conclusion: HTML5 's new tag inserts multiple types of resources, provided the browser supports this type of file; the object W3school: "object was originally intended to replace the IMG and applet elements. This is not true, however, due to vulnerabilities and lack of browser support. "No, No, no," the Applet (w3school: "HTML 4.01 deprecated the use of <applet> elements.) "Deserted things, not looked) Marqueen (text scrolling)

Then, what are the properties that trigger Haslayout with the introduction property?

IE6: List: Display:inline-block;width any legal value except auto; Position:absolute float:left or right; PS: no wonder the float element still occupies a position under the IE6, The original recalculation of the layout;) zoom In addition to normal or null value of the legal value can be, (this see the most, another: zoom is the private property of IE, incompatible with the standard;)

IE Haslayout Learning Related Records

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.