IE8 开发者工具栏中的 Quirks 模式是什么?
我想知道 IE8 开发者工具栏中的 Quirks 模式是什么?为什么 Quirks 模式下的页面渲染与 IE8 标准模式下的页面渲染不同?
I am wondering what is Quirks mode in IE8 Developer toolbar? Why page rendering is different in Quirks mode than in IE8 standard mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
简单来说,就是让非常旧的网页以 IE 上一贯的方式显示。因此,如果网页的 HTML 不以指示标准合规模式的 DOCTYPE 开头,则 IE 将以 Quirks 模式显示它。在这种模式下,IE 使用自己的盒模型来渲染页面元素。
一个简单的例子是:IE的盒子模型在宽度的内部添加了padding,所以一个div占用了width像素数,但是StandardCompliance模式将padding添加到了宽度上,所以一个div将占用width+padding像素数。
您可以尝试使用宽度为 300px、内边距为 100px 的 div,然后在 IE 开发人员栏中的模式之间单击以查看差异。
更多信息请访问:http://en.m.wikipedia.org/wiki/Quirks_mode
Simply speaking, it is for really old webpages to show in the way it always has been on IE. So if a webpage's HTML doesn't start with a DOCTYPE that indicates Standard Compliance Mode, then IE will show it in Quirks mode. In such mode, IE uses its own Box Model to render the page elements.
A simple example is: IE's box model adds padding to the inside of the width, so a div occupies the width number of pixels, but Standard Compliance mode add the padding to the width, so a div will occupy width + padding number of pixels.
You can try a div with width 300px and padding 100px and click between the modes in IE Developer's bar to see the difference.
More info at: http://en.m.wikipedia.org/wiki/Quirks_mode
我认为这会很有用: http://www.quirksmode.org/css/quirksmode.html< /a>.
I think it will be useful : http://www.quirksmode.org/css/quirksmode.html.
Quirks 模式基本上是一种遗留模式,允许 IE 渲染在没有人遵守 html 标准的时代编写的网页。
Quirks mode is basically a legacy mode that allows IE to render web pages that were written back in the day where no one adhered to html standards.