清浮动,防止上下margin重叠(浏览器顶部空白崩溃)

清浮动
父级添加类别!
.clearfix{zoom:1;//兼容ie6,7}
.clearfix:after{
content:".";
display: "block";
height: "0";
clear: both;
visibility: hidden;
}

防止上下margin重叠,也可以清除浮动塌陷(推荐

.clearfix:after,
.clearfix:before{
content:" ";
display: table;
}
.clearfix:after{clear: both;}
.clear{ clear:both;}

  

上一篇:Java并发编程(一):进程和线程之由来


下一篇:office web apps部署(二)