清除浮动

https://segmentfault.com/a/1190000015960009

利用:after伪选择符,在父容器的尾部自动创建一个子元素

.clearfix:after {
    content: "";
    display: block;
    clear: both;
}
//兼容ie6:激活父元素的"hasLayout"属性,让父元素拥有自己的布局
.clearfix {
    zoom: 1;  //或者height:1%;
}
原文地址:https://www.cnblogs.com/songsongblue/p/11632661.html