/* 最好方法使用:after */
div:after{
content: '';
clear: both;
display: block;
width: 0;
height: 0;
}
/* 或者新建一个空元素来清除浮动 */
.clear{
clear: both;
height: 0;
line-height: 0;
font-size: 0;
}
/* 给父元素增加overflow属性 */
.over-flow{
over-flow: auto;
zoom: 1; /* 触发IE hasLayout, 处理兼容性问题*/
}