浏览器兼容CSS写法

IE 系列专用
height: 100px \9;

padding: ~"5px\9"; /* IE8 and below */

IE6 专用
_height: 100px;

IE6 专用
*height: 100px;

IE7 专用
*+height: 100px;

IE7、FF 共用
height: 100px !important;

IE8以IE7的标准解析


谷歌浏览器、Safari
@media screen and (-webkit-min-device-pixel-ratio:0) {
其中写入要兼容的样式
}

/* Firefox */
@-moz-document url-prefix()
{
#firefox { display: block; }
}

/*opera*/
@media all and (min-width:0px){ #test {background-color:black\0;} }




@media screen and (min-width:0\0) {
/* IE9 and IE10 rule sets go here */
}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* IE10-specific styles go here */
}

相关主题
相关文档
最新文档