IE10、IE11和Microsoft Edge的Hack

2016-07-04 22:48:44來(lái)源:威易網(wǎng)作者:icech

隨著Win10的推廣,Microsoft Edge瀏覽器已經(jīng)越來(lái)越普遍,但是IE11也是伴隨其中,尾大不掉。所以在前端開發(fā)的過(guò)程中,就會(huì)遇到IE10、IE11和Microsoft Edge的Hack問(wèn)題。

隨著Win10的推廣,Microsoft Edge瀏覽器已經(jīng)越來(lái)越普遍,但是IE11也是伴隨其中,尾大不掉。所以在前端開發(fā)的過(guò)程中,就會(huì)遇到IE10、IE11和Microsoft Edge的Hack問(wèn)題。

下面就介紹一下IE10、IE11和Microsoft Edge的Hack的大全:

CSS-Hack for Microsoft Edge Browser 12+

@supports (-ms-accelerator:true) {
  .selector { property:value; }
}

CSS-Hack for Microsoft Edge Browser 12+

_:-ms-lang(x),
_::-webkit-meter-bar,
.selector {
    property:value;
}

CSS-Hack for Microsoft Edge Browser 12+

_:-ms-lang(x),
_:-webkit-full-screen,
.selector {
    property: value;
}

CSS-Hack for Microsoft Edge Browser 12 only

@supports (-ms-accelerator:true) and (not (color:unset)) {
  .selector { property:value; }
}

CSS-Hack for Microsoft Edge Browser 13+

@supports (-ms-accelerator:true) and (color:unset) {
  .selector { property:value; }
}

CSS-Hack for Microsoft Edge Browser 13+

_:-ms-lang(x),
_::-webkit-meter-bar,
.selector {
    property:value;
}

CSS-Hack for Internet Explorer 11+(IE11、Edge)

@charset "<Any Modern Browser but MSIE 10- or FF 18- >";
_:-ms-lang(x), .selector { property:value; }

CSS-Hack for Internet Explorer 11 only

_:-ms-fullscreen,
:root .selector {
    property: value;
}

CSS-Hack for Internet Explorer 10+(IE10、IE11、Edge)

_:-ms-lang(x),
.selector {
    property: value;
}

CSS-Hack for Internet Explorer 10 only

_:-ms-lang(x),
.selector {
    property: value9;
}

CSS-Hack for Internet Explorer 9+(IE9、IE10、IE11)

_::selection,
.selector {
    property: value