zoukankan      html  css  js  c++  java
  • ie11媒体查询以及其他hack

    <!doctype html>
    <html>
     <head>
      <title>IE10/11 Media Query Test</title>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <style>
        @media all and (-ms-high-contrast:none)
         {
         .foo { color: green } /* IE10 */
         *::-ms-backdrop, .foo { color: red } /* IE11 */
         }
      </style>
     </head>
     <body>
      <div class="foo">Hi There!!!</div>
     </body>
    </html>

    IE 6

    * html .ie6 {property:value;}
    down vote
    In the light of the evolving thread, I have updated the below:
    
    IE 6
    
    * html .ie6 {property:value;}
    or
    
    .ie6 { _property:value;}
    IE 7
    
    *+html .ie7 {property:value;}
    or
    
    *:first-child+html .ie7 {property:value;}
    IE 6 and 7
    
    @media screen9 {
        .ie67 {property:value;}
    }
    or
    
    .ie67 { *property:value;}
    or
    
    .ie67 { #property:value;}
    IE 6, 7 and 8
    
    @media screen\,screen9 {
        .ie678 {property:value;}
    }
    IE 8
    
    html>/**/body .ie8 {property:value;}
    or
    
    @media screen {
        .ie8 {property:value;}
    }
    IE 8 Standards Mode Only
    
    .ie8 { property /***/: value9 }
    IE 8,9 and 10
    
    @media screen {
        .ie8910 {property:value;}
    }
    IE 9 only
    
    @media screen and (min-0) and (min-resolution: .001dpcm) { 
     // IE9 CSS
     .ie9{property:value;}
    }
    IE 9 and above
    
    @media screen and (min-0) and (min-resolution: +72dpi) {
      // IE9+ CSS
      .ie9up{property:value;}
    }
    IE 9 and 10
    
    @media screen and (min-0) {
        .ie910{property:value9;} /* backslash-9 removes ie11+ & old Safari 4 */
    }
    IE 10 only
    
    _:-ms-lang(x), .ie10 { property:value9; }
    IE 10 and above
    
    _:-ms-lang(x), .ie10up { property:value; }
    or
    
    @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
       .ie10up{property:value;}
    }
    IE 11 (and above..)
    
    _:-ms-fullscreen, :root .ie11up { property:value; }

    原文地址 http://stackoverflow.com/questions/20541306/how-to-write-a-css-hack-for-ie-11

     
  • 相关阅读:
    NS2 nam中节点及数据流颜色设置
    JSF简单介绍
    深入浅出谈开窗函数(一)
    BZOJ2440(全然平方数)二分+莫比乌斯容斥
    怎样在SharePoint管理中心检查数据库架构版本号、修补级别和修补程序的常规监控
    Java实现BASE64编解码
    博弈 个人 见解
    【剑指offer】第一个仅仅出现一次的字符
    cocos2d基础篇笔记四
    SSL连接建立过程分析(1)
  • 原文地址:https://www.cnblogs.com/juexin/p/5729529.html
Copyright © 2011-2022 走看看