强制Internet Explorer 9进入Quirks模式

时间:2021-12-12 17:04:20

I have a web design class and our teacher wish's for us to force a browser into quirks mode.

我有一个网页设计课,我们老师希望我们强制浏览器进入怪癖模式。

Is their any CSS feature or html 5 feature that will do the job? Its for a discussion question but I need to make a simple webpage.

他们的任何CSS功能或html 5功能是否可以完成这项工作?它是一个讨论问题,但我需要制作一个简单的网页。

3 个解决方案

#1


5  

Don't provide a doctype, it will go into quirks mode on its own.

不提供doctype,它将自己进入怪癖模式。

<html>
    <head>
        <title>I'm in Quirks Mode</title>
    </head>
    <body>
        <p>Quirks mode supports the JavaScript functionality of 
        IE6, and the Quirks mode of IE7 and IE8.</p>
    </body>
</html>

If you need something to cite:

如果您需要引用的话:

If your webpage uses one or more features that require IE9 mode and you do not include a standards-compliant !DOCTYPE directive, Internet Explorer 9 displays, by default, your webpage in IE5 (Quirks) mode, which does not support features that require IE9 mode. source

如果您的网页使用一个或多个需要IE9模式的功能而且您没有包含符合标准的!DOCTYPE指令,则默认情况下,Internet Explorer 9会在IE5(Quirks)模式下显示您的网页,该模式不支持需要IE9的功能模式。资源

Additionally you can force it into Quirks Mode via the developer tools as well; just press F12 and change the Document Mode. Note that this method is usually only used for quick testing, and affects your local copy only.

此外,您还可以通过开发人员工具强制它进入Quirks模式;只需按F12键即可更改文档模式。请注意,此方法通常仅用于快速测试,并且仅影响本地副本。

强制Internet Explorer 9进入Quirks模式

#2


2  

Adding any HTML comment block above your tag will throw IE9 into Quirks Mode!

在标签上方添加任何HTML注释块会使IE9进入Quirks模式!

Like this

<!-- -->
<!DOCTYPE html>
<html>

Source http://timjames.me/force-ie9-into-quirks-mode

#3


1  

try without doctype but it wont be a good idea

尝试没有doctype但它不是一个好主意

or try

<!-- -->
<!DOCTYPE html>

#1


5  

Don't provide a doctype, it will go into quirks mode on its own.

不提供doctype,它将自己进入怪癖模式。

<html>
    <head>
        <title>I'm in Quirks Mode</title>
    </head>
    <body>
        <p>Quirks mode supports the JavaScript functionality of 
        IE6, and the Quirks mode of IE7 and IE8.</p>
    </body>
</html>

If you need something to cite:

如果您需要引用的话:

If your webpage uses one or more features that require IE9 mode and you do not include a standards-compliant !DOCTYPE directive, Internet Explorer 9 displays, by default, your webpage in IE5 (Quirks) mode, which does not support features that require IE9 mode. source

如果您的网页使用一个或多个需要IE9模式的功能而且您没有包含符合标准的!DOCTYPE指令,则默认情况下,Internet Explorer 9会在IE5(Quirks)模式下显示您的网页,该模式不支持需要IE9的功能模式。资源

Additionally you can force it into Quirks Mode via the developer tools as well; just press F12 and change the Document Mode. Note that this method is usually only used for quick testing, and affects your local copy only.

此外,您还可以通过开发人员工具强制它进入Quirks模式;只需按F12键即可更改文档模式。请注意,此方法通常仅用于快速测试,并且仅影响本地副本。

强制Internet Explorer 9进入Quirks模式

#2


2  

Adding any HTML comment block above your tag will throw IE9 into Quirks Mode!

在标签上方添加任何HTML注释块会使IE9进入Quirks模式!

Like this

<!-- -->
<!DOCTYPE html>
<html>

Source http://timjames.me/force-ie9-into-quirks-mode

#3


1  

try without doctype but it wont be a good idea

尝试没有doctype但它不是一个好主意

or try

<!-- -->
<!DOCTYPE html>