W3C盒子模型与IE5盒子模型相比有什么优势?
我认为IE5的盒子模型更接近人类对于盒子概念的逻辑,包括padding和border。它可以直接定义盒子的宽度和高度。
如果您有一个元素 宽度为100%的IE5框 模型允许您添加填充和 安全边境。将此与 正确的 CSS 盒模型,其中您 无法添加任何填充或边框 宽度为 100% 的元素 不破坏布局
那么任何人都可以详细解释一下吗?W3C 盒模型的优点是什么?
谢谢
I think the IE5 box model is more similar to human's logic about box's concept,withing including padding and border.It can defined the box width and height directly.
In cases in which you have an element
with a width of 100%, the IE5 box
model allows you to add padding and
borders safely. Compare this to the
correct CSS box model, in which you
cannot add any padding or borders to
an element with a width of 100%
without breaking the layout
So any one could explain it in details?What is the W3C box model advantages?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
100% 示例有时是 W3C 盒模型的有效问题,但它主要是一个有争议的问题,因为您可以使用以下代码并实现您所说的“IE 5 盒模型”:
box- sizing
可在所有主流浏览器 IE8+ 中使用。我现在只用它;在我看来,微软在这一点上是正确的。另请参见
The 100% example is sometimes a valid issue with the W3C box model, however it is mostly a moot point because you can use the following code and achieve what you are referring to as the "IE 5 box model":
box-sizing
is available in all major browsers IE8+. I use it exclusively now; Microsoft had this one right, in my opinion.Also See
至少可以说,采用 W3C 盒模型的主要优点是 IE5 盒模型的采用率正在下降。大多数人应该认为 IE6 已经过时了,更不用说 IE5 了。
The primary advantage of adopting the W3C box model is that the IE5 box model adoption rate is dwindling, to say the least. Most people should consider IE6 outdated, never mind IE5.