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

  1. <styletypestyletype=”text/CSS”> 
  2. #body{  
  3. border:2pxsolid#00f;/*Firefox的属性*/  
  4. border:2pxsolid#090\9;/*IE6/7/8的属性*/  
  5. border:2pxsolid#F90\0;/*IE8支持*/  
  6.  
  7. _border:2pxsolid#f00;/*IE6的属性*/  
  8. }  
  9.  
  10. </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方式讲解
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值