Apply style ONLY on IE

后端 未结 12 2147
迷失自我
迷失自我 2020-11-28 01:14

Here is my block of CSS:

.actual-form table {
  padding: 5px 0 15px 15px;
  margin: 0 0 30px 0;
  display: block;
  width: 100%;
  background: #f9f9f9;
  bor         


        
12条回答
  •  隐瞒了意图╮
    2020-11-28 01:42

    There are severals hacks available for IE

    Using conditional comments with stylesheet

    
    

    Using conditional comments with head section css

    
    

    Using conditional comments with HTML elements

    
    

    Using media query

     IE10+
     @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
     selector { property:value; }
     }
    
     IE6,7,9,10
     @media screen and (min-width: 640px), screen\9 {
     selector { property:value; }
     }
    
     IE6,7
     @media screen\9 {
      selector { property:value; }
     }
    
     IE8
     @media \0screen {
      selector { property:value; }
     }
    
     IE6,7,8
     @media \0screen\,screen\9 {
      selector { property:value; }
     }
    
     IE9,10
     @media screen and (min-width:0\0){
      selector { property:value; }
     }
    

提交回复
热议问题