原文地址:http://www.ecshopdev.com/article-495.html
1.<div style="padding-top:5px;height:10px !important;height:15px;width:200px;background-color:#ffeeee"> test </div>
上面定义了两个height, 其中一个后面加了!important , IE将会忽略这个属性,而使用后面的height:15px;
而firefox却不会忽略这个属性, 直接使用height:10px;
解决方案二、当然也可以使用*
1.<div style="padding-top:5px;height:10px;*height:15px;width:200px;background-color:#ffeeee"> test </div>
*height只会被IE6/IE7解析,而FF不会解析*height
Ps:测试后补充说明一点,在IETest中测试IE6的padding-top和FF的解析方式一样,
所以如果使用*height的话还需要添加_height=10px来完善IE6的现实效果,
这样就可以很巧妙的解决这个问题