您的位置:首页 > 其它

ie6、7、8、9单独hack兼容写法

2014-10-13 11:06 127 查看
<styletypestyletype=”text/CSS”>

#body{

border:2pxsolid#00f;/*Firefox的属性*/

border:2pxsolid#090\9;/*IE6/7/8的属性*/

border:2pxsolid#F90\0;/*IE8支持*/



_border:2pxsolid#f00;/*IE6的属性*/

}



</style>

1. _          IE6
  2. *          IE6/7
  3. !important IE7/Firefox
  4. *+         IE7
  5. \9         IE6/7/8
  6. \0         IE8
  7. 条件hack
      <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]--> IE7以下版本
      <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--> IE7
      <!--[if IE 8]> <html class="no-js lt-ie9"><![endif]--> IE8
      <!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]--> IE8以上

相关文章:css hack全解,最齐全的ie css hack方式讲解
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: