zoukankan      html  css  js  c++  java
  • 关于ie中的hack以及条件注释方法

    由于现在一般都最低要求只支持到ie8浏览器以上,所以不再管ie6 7

    1:条件注释

    ie中条件注释使用方法

    <!--[if IE 5]>仅IE5.5可见<![endif]-->
    
    
    <!--[if gt IE 5.5]>仅IE 5.5以上可见<![endif]-->
    
    
    <!--[if lt IE 5.5]>仅IE 5.5以下可见<![endif]-->
    
    
    <!--[if gte IE 5.5]>IE 5.5及以上可见<![endif]-->
    
    
    <!--[if lte IE 5.5]>IE 5.5及以下可见<![endif]-->
    
    
    <!--[if !IE 5.5]>非IE 5.5的IE可见<![endif]-->
    • gt : greater than,选择条件版本以上版本,不包含条件版本
    • lt : less than,选择条件版本以下版本,不包含条件版本
    • gte : greater than or equal,选择条件版本以上版本,包含条件版本
    • lte : less than or equal,选择条件版本以下版本,包含条件版本
    • ! : 选择条件版本以外所有版本,无论高低

    2:hack

    9

    例子:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .tet{
                width: 100px;
                height: 100px;
                background: #000;
                background: red9;
            }
        </style>
        <!--[if gte IE 8.0]>
            <style>
                .tet{
                    background: red;
                }
            </style>
        <![endif]-->
    </head>
    <body>
        <div class="tet"></div>
    </body>
    </html>
  • 相关阅读:
    4A安全体系
    Linux 安装 Nginx
    Linux 安装 Mysql
    Web容器对比
    Nginx 学习记录
    SO_REUSEADDR选项的平台差异(对于TCP)
    centos下搭建yum服务器
    IOCP 下行为投递的关键点
    网络包解包错误 与 标准io(linux)
    关闭ssh的dns反向解析
  • 原文地址:https://www.cnblogs.com/joesbell/p/5952683.html
Copyright © 2011-2022 走看看