What is haslayout?

后端 未结 1 1281
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 06:22

I\'ve read some article on it but didn\'t get what is actually. can anyone on SO explain me.

Is it only related to IE6 only?

What does zoom:1?

相关标签:
1条回答
  • 2020-11-30 06:43

    It's a non-standard property on an HTML element which is only supported by IE7 and lower ( IE8 compatability mode too ), which if triggered, causes the element to be rendered in a certain way ( which can be unexpected, random, can be a godsend or can be hell ).

    Classic example is giving layout to an element so it can clear floats.

    #wrapper { zoom:1; }
    

    The element will now contain floats. Any of these properties and value other than auto/normal will trigger the layout property.

    * display: inline-block
    * height: (any value except auto)
    * float: (left or right)
    * position: absolute
    * width: (any value except auto)
    * writing-mode: tb-rl
    * zoom: (any value except normal)
    

    Please have a thorough read @ http://reference.sitepoint.com/css/haslayout

    0 讨论(0)
提交回复
热议问题