xhtml文档,如何触发quirk模式?

发布于 2024-09-07 17:45:02 字数 60 浏览 0 评论 0原文

有了Xhtml文档,如何在Internet Explorer中触发怪异模式? 它与元标记或文档类型有关吗?

With the Xhtml document , how do you trigger quirk mode in internet explorer?
is it related to meta tag or doc type?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

烟酉 2024-09-14 17:45:02

Internet Explorer 不支持 XHTML。为了成为 XHTML,它必须使用 application/xhtml+xml 内容类型来提供,但 IE 不支持这一点。如果您使用 text/html ,无论 DOCTYPE 是什么,它都会被解析为 HTML。

Internet Explorer doesn't support XHTML. In order to be XHTML it must be served with the application/xhtml+xml content-type, but IE doesn't support that. If you use text/html it will be parsed as HTML regardless of DOCTYPE.

后eg是否自 2024-09-14 17:45:02

通常,如果您不指定 DOCTYPE,大多数现代浏览器将以怪异模式呈现页面。您还可以使用 xhtml1-transitional 作为 DOCTYPE 来“触发”怪异模式。 查看此图表

IE6 中存在一个错误,如果您在 DOCTYPE 之前放置 xml 声明或空格,则会导致触发怪异模式,但这在 IE7 中已修复。

Usually if you don't specify a DOCTYPE most modern browsers will render the page in quirks mode. You can also "trigger" quirks mode by using xhtml1-transitional as your DOCTYPE. See this chart.

There was a bug in IE6 that caused quirks mode to be triggered if you put an xml declaration or white spaces before the DOCTYPE, but that was fixed in IE7.

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