1.伪元素清除法:.clear:after{display:block;clear:both;content:"";visibility:hidden;height:0}
2.额外标签法:clear:both;
3.给父元素加overflow:hidden/auto;
4.给浮动元素下加<div class="clear"></div> .clear{width:0;height:0;clear:both}
5.给父元素也加浮动
1.伪元素清除法:.clear:after{display:block;clear:both;content:"";visibility:hidden;height:0}
2.额外标签法:clear:both;
3.给父元素加overflow:hidden/auto;
4.给浮动元素下加<div class="clear"></div> .clear{width:0;height:0;clear:both}
5.给父元素也加浮动