We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
仅考虑ie8+
判断IE浏览器的范围:
lt
lte
gt
gte
!
<!--ie 8,9支持--> <!--[if gte ie 8]> <link rel="stylesheet" type="text/css" href="./style.css"> <![endif]-->
注:只能采用外链的样式书写css代码
#box { width: 100px; height: 100px; background-color: pink; background-color: purple\9\0; background-color: red !important; }
ie11 未测试,edge使用ie模拟器测试,ie11均未测试
@media \0screen {body { background: red; }} /*IE8 专属*/ @media screen\0 {body { background: green; }} /* IE8-IE10,Edge*/ @media screen {body {background-color: blue;}}/* IE8-IE10,Edge,IE11*/ _::selection,body { background-color: blue; } /*IE9,IE10*/ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {body { background: orange; }} /*IE10,Edge*/ _:-ms-lang(x),body { background-color: blue;} /*IE10*/
:target :empty :nth-child :nth-of-type :checked :disabled
opacity
filter: alpha(opacity=50)
flex
box-sizing
outline
background-position
border-radius
box-shadow
background-size
/*使用固定宽高布局*/ .i-upload { display: inline-block; width: 16px; height: 16px; background: url("../imgs/icon_upload.png") no-repeat; background-position: -2000px -2000px\9; background-size: 16px 16px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../imgs/icon_upload.png', sizingMethod='scale'); }
transition
animation
<!-- 使用IE7模式渲染 --> <meta http-equiv="X-UA-Compatible" content="IE=7"> <!-- 使用最新引擎 --> <meta http-equiv="x-ua-compatible" content="IE=edge" >
<style> article, main, nav, aside, section, header, footer, figure, figcaption { display: block; } </style> <!--[if lte IE 8]> <script src="html5shiv.js"></script> <![endif]-->
-webkit-
-ms-
-moz-
The text was updated successfully, but these errors were encountered:
No branches or pull requests
IE兼容性
了解浏览器支持情况
兼容性写法
1. 条件注释法
判断IE浏览器的范围:
lt
: less than是小于lte
: less than or equal 是小于或等于gt
:greater than是高于gte
: greater than or equal高于或等于!
: 是不等于,选择条件版本以外所有版本,无论高低例子
2.行内后缀
例子
3.选择器前缀
参考链接
其他
CSS3 选择器兼容性
:target :empty :nth-child :nth-of-type :checked :disabled
无法在 IE6-8 用IE差异
opacity
=》filter: alpha(opacity=50)
flex
IE10+IE8 支持
box-sizing
outline
background-position
IE8不支持
border-radius
box-shadow
opacity
background-size
IE9 不支持
transition
与animation
控制 IE 模式(<=10)
media query
语义化的 HTML5 标签
浏览器前缀
-webkit-
-ms-
-moz-
测试兼容性
Polyfill
The text was updated successfully, but these errors were encountered: