zoukankan      html  css  js  c++  java
  • 【css】解决浏览器兼容——CSS HACK

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">  
     <head>  
         <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />  
         <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />  
         <title>css hack</title>  
         <style type="text/css">  
         .demo{100px;height:100px;border:5px solid orange;}  
         .demo1{  
             background:black;   /* for all */  
         }  
         .demo2{  
             background:green\9; /* for ie */  
         }  
         .demo3{  
             background:yellow\0;    /* for ie8 */  
         }  
         .demo4{  
             *background:blue;   /* for ie7,ie6 */  
         }  
         .demo5{  
             _background:red;    /* for ie6 */  
         }  
         </style>  
     </head>  
     <body>  
         <div class="demo demo1"></div><br/>  
         <div class="demo demo2"></div><br/>  
         <div class="demo demo3"></div><br/>  
         <div class="demo demo4"></div><br/>  
         <div class="demo demo5"></div>  
     </body>  
     </html>
  • 相关阅读:
    利用锚点制作简单索引效果
    BOM之location对象
    引入CSS
    对象继承
    indexOf、instanceOf、typeOf、valueOf详解
    JSON详解
    浏览器兼容性-JS篇
    gcc堆栈排列的建议(译文)
    VLAN 学习
    DPDK KNI 接口2
  • 原文地址:https://www.cnblogs.com/vincent_ds/p/2826305.html
Copyright © 2011-2022 走看看