html – 什么是haslayout?

我已经阅读了一些文章,但没有得到什么实际.任何人都可以解释我.

它只与IE6有关吗?

放大:1?

布局是否只是IE的TAG?

编辑:

我发现这个信息对我来说非常丰富

Because Internet Explorer is so old
(as it was one of the first browsers
available),it hasn’t had the luxury
of starting anew as current browser
do. So as time went by,Microsoft
began adapting new engines to make use
of CSS. Seems fine… However,CSS
changes the fundamental assumption
that Internet Explorer’s engine is
based on – that anything significant
is a rectangle that contains all its
content.

So to deal with the new standards of
CSS,Microsoft decided to fix their
ancient engine by implementing the
hasLayout property,instead of
rebuilding IE. Every element in
Internet Explorer Now has a hasLayout
property. Depending on the element,it
is set to either true or false by
default. If hasLayout is set to true –
the element is an independent Box that
is responsible for rendering itself.
If false – then the element relies on
a parent element that has hasLayout
set to true to render it. This is
where a majority of IE bugs come to
life.

来源:http://bytesizecss.com/blog/post/fix-haslayout-with-one-line-of-css

我再发现一个这样的讨论:http://www.molly.com/2007/03/30/back-to-work-someone-please-clearly-articulate-haslayout/

解决方法

它是一个HTML元素上的非标准属性,仅由IE7和更低版本(IE8兼容模式)支持,如果触发该元素会以某种方式呈现元素(这可能是意想不到的,随机的,可以是godsend或可以是地狱).

经典示例是给元素布局,以便清除浮点数.

#wrapper { zoom:1; }

该元素现在将包含浮点数.任何这些属性和值除auto / normal之外都会触发布局属性.

* 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)

请仔细阅读@ http://reference.sitepoint.com/css/haslayout

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些