---
# System prepended metadata

title: (工作筆記) for ie9~11 瀏覽器的 css hack
tags: [工作筆記, ' css hack', ' ie', css]

---

---
tags: 工作筆記,css, ie, css hack
---
# (工作筆記) for ie9~11 瀏覽器的 css hack

## IE11(and above) 測試可行
_:-ms-fullscreen, :root .foo { property:value; }


## IE10 測試可行
@media all and (-ms-high-contrast: none) {
  .className {
      property:value;
  }
}

----剩下的沒實際用過

## IE10(and above)
### 方法1.
_:-ms-lang(x), .foo { property:value; }

### 方法2.
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
   .foo{property:value;}
}

### 方法3.
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .foo {
    property:value;
  }
}

### IE10(only)
_:-ms-lang(x), .foo { property:value\9; }


### IE9(and above)
@media screen and (min-width:0\0) and (min-resolution: +72dpi) {
  //.foo CSS
  .foo{property:value;}
}

### IE9+10
@media screen and (min-width:0\0) {
    .foo 
    /* backslash-9 removes.foo & old Safari 4 */
}

### IE9(only)
@media screen and (min-width:0\0) and (min-resolution: .001dpcm) { 
 //.foo CSS
 .foo{property:value;}
}


### 資料來源
https://stackoverflow.com/questions/20541306/how-to-write-a-css-hack-for-ie-11

### 190902-補充
-ms-animation-name: 這個屬性顯然在ie10及之後已被棄用，測試後並無效果
