gpt4 book ai didi

html - 什么是布局?

转载 作者:技术小花猫 更新时间:2023-10-29 12:26:06 28 4
gpt4 key购买 nike

我已经阅读了一些关于它的文章,但没有真正理解它是什么。 SO 上的任何人都可以向我解释一下吗?

是否只与IE6相关?

什么是zoom:1

layout 是 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 兼容模式)支持,如果被触发,将导致元素以特定方式呈现(这可能是出乎意料的、随机的,可能是天赐之物,也可能是 hell )。

经典示例是为元素提供布局,以便它可以清除 float 。

#wrapper { zoom:1; }

该元素现在将包含 float 。除了 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

关于html - 什么是布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1794350/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com