1.父元素框内在结束的时候加上<div class= "clearfix"></div>
<div id="parent">
<div id = "child">
</div>
<div class= "clearfix"></div>
</div>
2.给父元素加上样式:style="overflow: hidden"
3.给父元素定义一个高度(一般不用)
4.在最后添加一个<div style="clear:both"></div>
https://blog.csdn.net/FE_dev/article/details/68954481