您正在查看 "Css" 分类下的文章
2007年07月03日 星期二 上午 10:42
以前人们为了解决ie6和其他浏览器不同渲染模式导致css不一样,想出来了利用ie6不支持css的!important欺骗ie6的解决办法,但是不幸,ie7支持!important了,哈哈,我来大概介绍一下吧:
div {
width:200px;
width:300px;
}
这个div肯定是300宽,后面优先,可是加入!important呢
div {
width:200px !important;
width:300px;
}
由于!important的加入,导致了第一条width的优先级高,所以这个div是200宽,但是ie6不认!important就当没有,所以还是后面覆盖前面,这样就使用ie6对于!importan |
|
|