html - &lt;meta http-equiv ="X-UA-Compatible"content ="IE=EmulateIE7"/> 它应该放在 <head> 的什么地方才能在 IE8 中正确地将文档呈现为 IE7?

标签 html css xhtml cross-browser

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />它应该放在 <head> 中的什么地方在 IE8 中将文档正确呈现为 IE7?

最佳答案

鉴于此元标记改变了文档的呈现方式,并可能导致视觉变化,我将应用与 content-type 相同的规则标题,这是 早于<head>尽可能

来自 W3C encoding specs :

The META declaration must only be used when the character encoding is organized such that ASCII-valued bytes stand for ASCII characters (at least until the META element is parsed). META declarations should appear as early as possible in the HEAD element.

关于html - &lt;meta http-equiv ="X-UA-Compatible"content ="IE=EmulateIE7"/> 它应该放在 <head> 的什么地方才能在 IE8 中正确地将文档呈现为 IE7?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2154037/

相关文章:

php - 将动态创建的表单字段传递给 PHP

html - react redux 中 api 调用的 400 错误在示例中正常工作

应用于 <col> 元素的 CSS 类未完全应用

html - iframe 标记阻止页面的其他内容

html - 如何将页脚向右移动一些?

java - 从 JSF 中的数据表获取选定行数据

jquery - 更改 Bootstrap 4 轮播方向

javascript - 仅使用 javascript/html5 获取麦克风/网络摄像头记录流

css - 更改下拉箭头的颜色和外观

标题内 2 个跨度上的 CSS3 边框半径,这种效果可能吗?