IE8 开发者工具栏中的 Quirks 模式是什么?

发布于 2024-09-29 16:12:09 字数 76 浏览 1 评论 0原文

我想知道 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

神也荒唐 2024-10-06 16:12:10

简单来说,就是让非常旧的网页以 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

流云如水 2024-10-06 16:12:10

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文