IE 标准模式

发布于 2024-09-10 08:19:09 字数 476 浏览 3 评论 0原文

我只是有一个关于 IE8 标准模式与 Quirks 模式的简单问题。

如果您加载其第一页然后登录,该页面显示正常。我已经搜索了文档类型,我认为该类型适合将页面更改为 IE8 标准模式,并且我认为它可以工作,因为 IE 内置的调试器表示它处于该模式。此外,如果您从使用怪异模式的另一个页面开始,然后导航到我的站点,调试器会将模式更改为 IE8 标准。

如果您在访问该页面之前将模式更改为 IE8 标准,则会出现问题。例如,假设您在 google 上并将调试器中的模式更改为 IE8 标准,然后访问该页面,该页面无法正确显示。

我希望我已经足够清楚地解释了我的问题。我已经发布了我正在使用的文档类型,这有帮助。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

I just have a quick question about IE8 Standards mode vs Quirks mode.

The page displays fine if you load its first page then log in. I have searched for the doc type which i think is right for changing the page to IE8 Standards Mode and i think it works because IE's built in debugger says it's in that mode. Also if you start on another page which uses quirks mode then navigate to my site the debugger changes modes to IE8 standards.

The problem starts if your change the mode to IE8 standards before you visit the page. e.g say your on google and change the mode in the debugger to IE8 standards then visit the site the page isn't displayed correctly.

I hope i've explained my problem clearly enough. I've posted the doctype i'm using is that is any help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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

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

发布评论

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

评论(2

锦欢 2024-09-17 08:19:09

将此元标记添加到头部

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

这将强制 IE 进入最新的标准模式。因此,如果他们有 IE8,即使之前设置为其他模式,也会使用 IE8。

您也可以毫无问题地开始使用 html doctype

<!DOCTYPE html>

您可以阅读有关它的更多信息 此处

Add this meta tag to the head

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

This will force IE into the latest standards mode. So if they have IE8 it will be in IE8 even if its set before to other mode.

Also you could start using the html doctype without problem

<!DOCTYPE html>

You can read more about it here:

染火枫林 2024-09-17 08:19:09

IE 博客发布了“IE8 如何确定文档模式”,您应该阅读该内容。另外,请注意,MS 引入了(...啊!Geries 在输入此内容时抢先了我!)看看 Geries 的评论。 :)

The IE Blog has posted "How IE8 Determines Document Mode" which you should read. Also, note that MS introduced a (... ah! Geries beat me to the punch while typing this!) Take a look at Geries' comment. :)

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