强制Internet Explorer 9使用标准文档模式 [英] Forcing Internet Explorer 9 to use standards document mode
问题描述
如何强制Internet Explorer 9使用标准文档模式?我建立了一个网站,我发现IE9使用怪异模式呈现网站页面。但我想使用标准模式进行渲染。
< meta http-equiv =X-UA-Compatiblecontent =IE = Edge>
这使得IE的每个版本都使用其标准模式,因此IE 9将使用IE 9标准模式。 (如果您希望更新版本的IE也专门使用IE 9标准模式,您可以用 9替换
。但很难看出你为什么要这么做。) Edge
有关解释,请参见 http://hsivonen.iki.fi/doctype/#ie8 (它看起来相当混乱,但那是因为IE在其行为上是混乱的) 。
How can I force Internet Explorer 9 to use standards document mode? I built a website and I'm finding that IE9 uses quirks mode to render the website pages. But I want to use standards mode for rendering.
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
This makes each version of IE use its standard mode, so IE 9 will use IE 9 standards mode. (If instead you wanted newer versions of IE to also specifically use IE 9 standards mode, you would replace Edge
by 9
. But it is difficult to see why you would want that.)
For explanations, see http://hsivonen.iki.fi/doctype/#ie8 (it looks rather messy, but that’s because IE is messy in its behaviors).
这篇关于强制Internet Explorer 9使用标准文档模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!