如何强制Intranet站点的浏览器IE8成Quirks模式? [英] How to force intranet sites browser into IE8 Quirks Mode?

查看:365
本文介绍了如何强制Intranet站点的浏览器IE8成Quirks模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用ASP.NET的渲染时始终显示在标准模式下的联网网站建成。当使用开发人员工具栏,我的地盘工程完全采用IE8 - Quirks模式。当使用标准模式下,它不能正常显示。

I have an intranet site built using ASP.NET that when rendered always displays in standards mode. When using the Developer Toolbar, my site works perfectly using 'IE8 - Quirks Mode'. When using Standards mode it does not appear properly.

我已经看到了十几个职位有关设置应用到标准模式(像这样的:<一href=\"http://stackoverflow.com/questions/2518256/override-intranet-compatibility-mode-ie8?rq=1\">Override内联网兼容模式IE8 ),但这些技术使得浏览器转到标准模式。

I have seen a dozen posts about setting the app into Standards mode (like this one: Override intranet compatibility mode IE8) but these techniques make the browser go to Standards mode.

这是否意味着怪癖是默认?如果是这样的话,我的网站不是默认的怪癖而在标准

Does that mean Quirks is the default? If that's the case, my site is not rendering by default in Quirks but rather in Standards.

我也试过这个问题,以及和它使得它在标准模式:结果
&LT; META HTTP-EQUIV =X-UA-Compatible的内容=IE = 8/&GT;

I also tried this as well and it to makes it in Standards mode:
<meta http-equiv="X-UA-Compatible" content="IE=8" />

什么标签,我可以转让或其他technice,以确保我的网站总是呈现的 IE 8 - Quirks模式

What meta tag can I assign or other technice to ensure my site is always rendered in IE 8 - Quirks Mode?

推荐答案

首先,你能做的最好的事情就是尽量放弃对Quirks模式的要求。它不只是改变页面布局,也可关闭所有的现代浏览器的功能。

Firstly, the best thing you can do is try to drop the requirement for Quirks mode. It doesn't just change the page layout, it also switches off all of the modern browser features.

如果你想使用任何这些现代特色这会给你带来麻烦。 (注意,Quirks模式是IE5兼容模式,所以现代特色的意思,因为IE5发明了pretty任何东西!)。出于这个原因,我强烈建议,如果可能的话,你考虑转换的网站,以便它工作在标准模式。

This will give you problems if you want to use any of these modern features. (note that quirks mode is an IE5-compatibility mode, so "modern features" means pretty much anything invented since IE5!). For this reason, I strongly recommend if at all possible that you consider switching the site so it works in Standards mode.

使用标准模式的主要原因是面向未来的code。 IE的坏名声是由于旧版本和功能,比如怪异模式,并在最近版本的IE,微软正试图摆脱过去的路程。我也不会感到惊讶地看到怪癖模式从浏览器在未来的某个时候消失。

The main reason for using standards mode is to future-proof your code. IE's bad reputation is due to old versions and features like quirks mode, and in recent versions of IE, Microsoft are trying to move away from the past. I would not be surprised to see quirks mode disappear from the browser at some point in the future.

此外,使用标准模式将让您的网站在所有其他浏览器正常工作。在Quirks模式,你的网站将永远只能正常在IE浏览器。

In addition, using standards mode will allow your site to work properly in all other browsers. In Quirks mode, your site will only ever work properly in IE.

好消息是,从怪癖模式切换网站的标准模式,往往比它的声音少了很多的工作。你需要了解的主要事情是一个CSS功能箱肆行。这使您可以使用,同时仍保持该网站是在标准模式下的怪癖模式的布局模式。

The good news is that switching a site from quirks mode to standards mode is often a lot less work than it sounds. The main thing you need to know about is a CSS feature box-sixing. This allows you to use the quirks mode layout model while still keeping the site in standards mode.

以下内容添加到你的CSS:

Add the following to your CSS:

* {box-sizing:border-box;}

这shuold希望解决的大多数是你要切换从怪癖模式到标准模式下的布局问题,并且应该让你留在标准模式。

This shuold hopefully fix the majority of the layout issues that you're getting switching from quirks mode to standards mode, and should allow you to stay in standards mode.

的布局问题,其余的都可能在IE5漏洞已修复在后续版本的IE,但在怪异模式留给兼容性的原因造成的。您可能需要手动修复它们。但希望不会有太多了。

The remainder of the layout issues are likely to be caused by bugs in IE5 that have been fixed in subsequent IE versions but left in quirks mode for compatibility reasons. You will probably need to fix these manually. But hopefully there won't be too many of them.





好了,如果你还在读书,我会认为上面是不是对你不够好,你真的要坚持到怪癖模式。

Okay, so if you're still reading, I'm going to assume that the above isn't good enough for you, and you really do want to stick to quirks mode.

在怪异模式把一个网站是很容易在IE:刚落DOCTYPE声明

Putting a site in quirks mode is fairly easy in IE: Just drop the DOCTYPE declaration.

在IE中看到的没有一个文档类型的站点,它会自动假定它应该呈现在怪癖模式。

When IE sees a site that doesn't have a doctype, it automatically assumes that it should render it in quirks mode.

正如我所说的,我强烈建议不这样做,但是如果你绝对要,这是如何做到这一点。

As I say, I strongly recommend not doing this, but if you absolutely have to, that's how to do it.

这篇关于如何强制Intranet站点的浏览器IE8成Quirks模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆