区别IE6与FF:
       background:orange;
       *background:blue;


    区别IE6与IE7:
       background:green !important;
       background:blue;


    区别IE7与FF:
       background:orange;
       *background:green;
       
方法一:在同一个CSS样式表中,使用 !important 来定义不同的值以适应Firefox和IE,例如:

padding: 20px !important;  /*For Firefox*/
padding: 10px;              /*For IE*/
(注意这里IE6是无法识别 !important 这个标记的,但它会识别padding: 20px,所以要在后面加上padding: 10px用来覆盖padding: 20px)

这个方法适用于修改少量代码。

例一:

CSS
#box {
     color:red !important;
     color:blue;
 }

HTML
<div ,IE7、IE8、FireFox不能.
*+ 针对IE7

相关文章:

  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2022-12-23
  • 2022-02-01
  • 2021-10-11
  • 2021-11-29
  • 2021-11-23
  • 2022-01-06
  • 2021-08-12
相关资源
相似解决方案