您的位置:首页 > 其它

关于浏览器 hack 目前ie版本为IE11

2017-01-17 10:21 246 查看

版本<=IE 9所用的hack

<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
<!--[if IE]> 所有的IE可识别 <![endif]-->
<!--[if IE 6]> 仅IE6可识别 <![endif]-->
<!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]-->
<!--[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]-->
<!--[if IE 7]> 仅IE7可识别 <![endif]-->
<!--[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]-->
<!--[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]-->
<!--[if IE 8]> 仅IE8可识别 <![endif]-->
<!--[if IE 9]> 仅IE9可识别 <![endif]-->


现在仍然可用的

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 screen\9 {
.ie67 {property:value;}
}
or

.ie67 { *property:value;}
or

.ie67 { #property:value;}


IE 6, 7 and 8

@media \0screen\,screen\9 {
.ie678 {property:value;}
}


IE 8

html>/**/body .ie8 {property:value;}
or

@media \0screen {
.ie8 {property:value;}
}


IE 8 Standards Mode Only

.ie8 { property /*\**/: value\9 }


IE 8,9 and 10

@media screen\0 {
.ie8910 {property:value;}
}


IE 9 only

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


IE 9 and above

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


IE 9 and 10

@media screen and (min-width:0) {
.ie910{property:value;}
}


IE 10 only

_:-ms-lang(x), .ie10 { property:value\9; }


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; }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: