Internet Explorer 站点兼容性

internet explorer site compatibility

我有一个完整的网站。它在某些 IE 版本上无法正确显示。如果我必须在 IE 上 运行 它,我必须更改所有样式 sheet 如果我这样做,那将是一团糟。让网站在 IE 上运行的最佳选择是什么?有什么建议么?我知道这个问题解释得不好。但我想通过反复试验让它至少发挥作用。因此,我们将不胜感激。

有些人会推荐使用 X-UA-Compatible META 标签,它允许您定义页面将使用哪个版本的 IE 呈现引擎。我想您会选择适合您的页面的版本,如下例所示:

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

但我强烈建议您使用 "edge mode",因为它

is the preferred document mode; it represents the highest support for modern standards available to the browser.

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

迟早你会再次遇到同样的问题,并且不得不处理它,因为

Starting with IE11, document modes are deprecated and should no longer be used, except on a temporary basis. Make sure to update sites that rely on legacy features and document modes to reflect modern standards.

因此,请多花时间根据最新标准相应地调整您的页面

可以在此处找到更多详细信息:

https://msdn.microsoft.com/en-us/library/bg182625(v=vs.85).aspx#docmode

https://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

https://www.modern.ie/en-us/performance/how-to-use-x-ua-compatible