隨著Win10的推廣,Microsoft Edge瀏覽器已經越來越普遍,但是IE11也是伴隨其中,尾大不掉。所以在前端開發(fā)的過程中,就會遇到IE10、IE11和Microsoft Edge的Hack問題。
下面就介紹一下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