首页 > 代码库 > CSS中识别各类IE的方法
CSS中识别各类IE的方法
IE6 only:
* html .ie6 { property: value;}
or
html .ie6 { _property: value;}
IE7 only:
*+html .ie7 { property: value;}
or
*:first-child+html ie7 { property: value;}
IE6 and IE7:
@media screen\9 { ie67 { property: value; }}
or
.ie67 { *property: value;}
IE6,7 and IE8:
@media \0screen\, screen\9 { ie678 { property: value; }}
IE8 only:
html>/**/body .ie8 { property: value;}
or
@media \0screen { ie8 { property: value; }}
IE8(只在标准模式):
.ie8 { property/*\**/: value\9;}
IE8,9 and IE10:
@media screen\0 { ie8910 { property: value; }}
IE9 only:
@media screen and (min-width:0\0) and (min-resolution: .001dpcm) { /*IE9 CSS*/ .ie9{ property: value; }}
IE9+:
@media screen and (min-width:0\0) and (min-resolution: +72dpi) { /*IE9+ CSS*/ .ie9up { property: value; }}
IE9 and 10:
@media screen and (min-width:0) { .ie910 { property: value; }}
IE10 only:
_:-ms-lang(x), ie10 { property: value;}
IE10+:
_:-ms-lang(x), ie10up { property: value;}
or
@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) { .ie10up { property: value; }}
IE11+:
_:-ms-fullscreen, :root .ie11up { property:value;}
CSS中识别各类IE的方法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。