【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>
原文地址:https://www.cnblogs.com/vincent_ds/p/2826305.html