2018年11月12日浏览器的兼容问题 (不断更新)

1、清除浮动的兼容性(低版本的浏览器不兼容问题)

.clearfix:after{

  content:"";

  clear:both;

  display:block;

  visibility:hidden;

  height:0;

}

.clear{

       *zoom:1;

}

2、透明度的兼容性

opacity:0.3;

filter:alpha(opacity=30);

3、各种国外浏览器在CSS3中的兼容问题

国内的浏览器的内核都是谷歌

Chrome的前缀-webkit-

Firefox的前缀-moz-

IE的前缀-ms-

Opera的前缀-o-

4、document获取根节点的兼容性(Ie6不支持document.documentElement)

var w=document.documentElement.clientWidth||document.body.clientWidth

posted @ 2018-12-02 20:38  請叫我官人  阅读(108)  评论(0编辑  收藏  举报