1 通用 .clearFloat:before, .clearFloat:after { display:table; content:" "; } .clearFloat:after{ clear:both; }
3.在最后一个子元素的后面加一个空的div,给它样式属性clear:both;