`

浏览器兼容技巧

    博客分类:
  • web
阅读更多

 

之前经常见到css中的!important,但一直没去理解它的意思

 

这两天在做一个页面,在i7,8,9和FF中都显示的还好,不过,拿到i6下就乱套了。。。

 

究其原因,主要有两点,margin和padding

 

下面是摘来的技巧~~

 

IE6能识别*,但不能识别 !important,
IE7能识别*,也能识别!important;
FF不能识别*,但能识别!important;

下划线"_",IE6支持下划线

 

background:orange;*background:green !important;*background:blue; 

background:orange;*background:green;_background:blue;

 

 

在个别浏览器中版本中,设置 border:none后仍会显示出边框,应写成border:0 none,因为none只针对border-style~~

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics