【问题标题】:On a view source, what language is this?在视图源上,这是什么语言?
【发布时间】:2015-10-24 01:29:09
【问题描述】:

所以我将其标记为 HTML、CSS 和 JS,因为它位于前端。我可以看到 if 语句,所以它似乎不仅仅是标记。我读它如下 - 如果小于 IE7 加载类 ie 和 ie6,如果 ie7 加载 ie 和 ie7,如果 ie8 加载 ie8,最后如果 ie9 或更大或不加载,比什么都不做

这种“语言”的文档在哪里

<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->

【问题讨论】:

  • Conditional comments 自 IE10 起已弃用。
  • 请try googling。
  • @cadegalt 阅读链接文章:“As of Internet Explorer 10, conditional comments are no longer supported by standards mode”。

标签: javascript html css internet-explorer


【解决方案1】:

【讨论】:

    【解决方案2】:

    他们被称为conditional IE classes

    阅读更多关于他们的信息,here 和 here。

    【讨论】:

    • 我同意,不再需要支持 IE7 或更低版本。
    【解决方案3】:

    这些被称为条件 cmets,本身不是一种语言。除非你把 IE 称为一种语言。

    它们只不过是微软决定允许对 IE 进行特殊指令的格式的精美 HTML cmets

    在此处阅读更多信息:http://www.quirksmode.org/css/condcom.html

    【讨论】:

    • quirksmode 文章是最好的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-23
    • 1970-01-01
    • 1970-01-01
    • 2011-04-06
    • 2014-09-03
    • 1970-01-01
    相关资源
    最近更新 更多