【问题标题】:X-UA-Compatible not working when wrapped in conditional comment?包装在条件注释中时,X-UA-Compatible 不起作用?
【发布时间】:2013-10-16 15:28:27
【问题描述】:

我最近在条件评论中遇到了以下元标记:

<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->

如果我错了,请纠正我,但经过一些测试,我得出的结论是,这条评论似乎阻止了 IE 以首选边缘模式显示文档。

任何人都知道为什么,首先将 X-UA 元标记放在条件注释中是否有任何用处?

【问题讨论】:

  • 没有理由将它放在条件语句中,因为它只会在 IE 中使用。
  • 还要注意IE10不支持条件cmets Microsoft support statement

标签: html internet-explorer meta-tags conditional-comments x-ua-compatible


【解决方案1】:

谁知道原因

条件 cmets 和 X-UA-Compatibile 都是预处理器

首先在条件注释中放置 X-UA 元标记有什么用吗?

没有

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-03-09
    • 2013-04-10
    • 1970-01-01
    • 2014-10-08
    • 2013-12-29
    • 2013-02-14
    • 2014-12-08
    • 2013-11-08
    相关资源
    最近更新 更多