IE8,本地文件的兼容性视图?

发布于 2024-08-02 16:20:35 字数 396 浏览 3 评论 0原文

我刚刚开发了一个小网站并在 IE8 中进行了本地测试,没有兼容性视图按钮,但在设置下我找到一个名为“在兼容性视图中显示 Intranet 站点”的选项,此选项已选中,因此我信任所有本地文件都呈现为 IE7。

然后我将页面上传到我的服务器,在 IE8 模式下一切正常,现在 comp-view 按钮可见,我单击它,我的设计就变成了 fubar!

我转到 comp-view 的设置并取消选中“在兼容性视图中显示 Intranet 站点”,当我尝试直接从硬盘浏览该站点时,该站点看起来仍然正常,并且仍然没有可见的 comp-view 按钮。

这次我很容易地在我的 CSS 中创建了一个修复程序,但我不想在更大的网站上再次经历这种情况。

我如何获得本地页面的 IE8 模式和兼容性视图,我是否可以相信它是否处于活动状态?

I just developed a small website and tested it locally in IE8, there is no compatibility view button but under settings i find an option called "display intranet sites in compatibility view", this option is checked so i trust that all local files are rendered as IE7.

I then upload the page to my server and everything works fine in IE8-mode, now the the comp-view button is visible, i click it and my design becomes fubar!

I go to the settings for comp-view and uncheck the "display intranet sites in compatibility view", the site still looks ok when i try to browse it directly from the hdd and there is still no comp-view button visible.

This time i managed to create a fix in my css quite easily but i don't want to experience this again for a larger website.

How can i get BOTH IE8-mode and compatibility view for local pages and can i trust that it is active or not?

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

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

发布评论

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

评论(3

亢潮 2024-08-09 16:20:35

如果您从 C:\(例如那种本地)加载文件,那么是的,您将被迫进入 IE8 标准模式。在这种情况下,切换它的唯一方法是使用开发人员工具 F12 并通过执行以下操作在此处切换它:

  1. 按 F12 访问开发人员工具。浏览器窗口底部将出现一个新窗格。
  2. 在左侧菜单上,向下滚动到最后一个选项(仿真)。或者,按 Ctl+8
  3. 将文档模式设置为所需的浏览器版本。

IE 开发工具示例

如果本地指的是在您的 PC 上或网络中的 PC(例如 Intranet)上运行的网络服务器)然后您可以将其添加到站点列表中...然后他们将在地址栏上提供图标来切换它。

根据您的描述,我认为您看到了重大变化,因此我认为您已经设置了 DOCTYPE。您能为我们核实一下吗?

If you load files off your C:\ (e.g. that kind of local) then yes, you are forced into IE8 standards mode. In this case, the only way to toggle it is to use the Developer Tools F12 and toggle it there, by doing the following:

  1. Press F12 to access the Developer Tools. A new pane will appear at the bottom of the browser window
  2. On the left menu, scroll down to the final option (Emulation). Or, press Ctl+8
  3. Set the Document Mode to the desired browser version.

IE Developer Tools Example

If by local you mean off a webserver running on your PC or on a PC in your network (e.g. Intranet) then you can add it/them to the list of sites... they will then provide the icon on the address bar to toggle it.

I presume based on your description that you are seeing significant changes thus I presume you have set a DOCTYPE. Can you verify this for us?

不如归去 2024-08-09 16:20:35

我在 IE8 中使用这个元标记来模拟 IE7。如果存在 Quirksmode Doctype,则此标签将不起作用。

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

您可以在 IE8 下使用 *+html CSS hack。

I use this Meta Tag in IE8 to emulate IE7. If there is a Quirksmode Doctype, then this tag will not work.

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

You can Use the *+html CSS hack under IE8.

凉月流沐 2024-08-09 16:20:35

不要检查“以兼容方式显示 Intranet 站点”,而是尝试检查“以兼容方式显示所有站点”。这就是我通常做的事情,而且看起来效果还不错。

Instead of checking the "Display intranet sites in compat" try checking the "display ALL sites in compat". Thats what I usually do and it seems to work ok.

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