浏览器兼容问题
IE条件注释法
<!--[if let IE 8]>
/* let小于等于; lt小于; !不等于 */
<link rel="stylesheet" href="base.csss">
<![endif]-->
<!--[if IE]>
/* 如果是IE */
<link rel="stylesheet" href="base.csss">
<![endif]-->
css属性前缀法
<style>
h1{
color:#111; /*all*/
color:#222\9; /*IE*/
*color:#333; /*IE6,IE7*/
_color:#444; /*IE6*/
}
</style>
选择器前缀法
<style>
*h1{
color:red; /*IE6,IE7*/
}
*+h1{
color:red; /*IE7*/
}
</style>
浏览器私有属性
<style>
div{
-webkit-color:red; /*为Chrome/Safari*/
-moz-color:red; /*为Firefox*/
-ms-color:red;/*为IE*/
-o-color:red;/*为Opera*/
color:red;
}
</style>