xhtml文档,如何触发quirk模式?
有了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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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 usetext/html
it will be parsed as HTML regardless of DOCTYPE.通常,如果您不指定
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 usingxhtml1-transitional
as yourDOCTYPE
. 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.