作用于浮动元素的父元素
.clearfix:after{ content:"."; display: block; height:0; visibility: hidden; clear:both; overflow:hidden; } .clearfix{ *zoom:1; /*兼容低版本IE*/ }