• ie6 ie7 ie8 ie9 ff css 区别


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>css 区别ie6 ie7 ie8 ie9 ff</title>
    <style type="text/css">
    div{ 500px; height:300px;  border:1px solid #f00; margin:0px auto;}
    .info{
     /* background:#000!important\0 ||  background:#000!important\0\9 ie6识别  ff ie7 ie8 ie9 不识别*/
     /*background:#000!important   ie6 ff ie7 ie8 ie9 识别 */
     /*background:#000;  ie6 ff ie7 ie8 ie9 识别 */
     /*background:#000\0;  ie6 ff ie7 不识别 ie8 ie9 识别 */
     /*background:#000\9;  ie6 ie7 ie8 ie9 识别 ff不识别 */
     /*background:#000\9;  ie6 ie7 ie8 ie9 识别 ff不识别 */
     /*background:#000\0\9; ie6 ie7 ff 不识别 ie8 ie9 识别*/
     /* *background:#000; ie6 ie7识别 ie8 ie9 ff 不识别*/
     /* *_background:#000; _background:#000; ie6 识别ie7 ie8 ie9 ff 不识别*/
    background:#FF0; /* ff */ /*黄色*/
    background:#0F0\9;/* ie 8 ie 9*//*绿色*/  
    *background:#F00;/*ie 6 ie 7*/ /* 红色*/
    _background:#00F; /*ie 6*/ /*蓝色*/
    }
    </style>
    <!--[if IE 8]>
    <style type="text/css">
    .info{
    background:#000;
    }
    </style>
    <![endif]-->
    </head>
    <body>
    <div class="info">
    可以用 \0 \9 来表示ie8 和ie9<br>
    可以用 * 区别 IE7<br>
    可以用 _ 区别 ie6<br>
    但最后无法 区别IE8 ie9<br>
    所以值能用<!--[if IE 8]> ie8 样式<![endif]-->
    一定要放在最后
    如果各位有更好的办法或哪里写的有误,请在评论中注明
    </div>
    </body>
    </html>
  • 相关阅读:
    权限管理的三级菜单的流程
    Django之extra
    Django-Rest-Framework的解析器和渲染器
    Django-Rest-Framework的权限和频率
    权限管理-一级菜单-二级菜单-三级菜单-路径导航和权限粒度控制到按钮级别
    Django-Rest-Framework的版本和认证
    【leetcode】Valid Number
    【leetcode】4Sum
    【leetcode】Preimage Size of Factorial Zeroes Function
    【leetcode】Champagne Tower
  • 原文地址:https://www.cnblogs.com/tongchuanxing/p/2521425.html
Copyright © 2020-2023  润新知