造成原因:子盒子有浮动,父级盒子没有高度。子级脱离了文档流。 上边框塌陷问题: 1.父级设置内边距 padding 2.父级设置边框 border 3.父级设置overflow: hidden; 4.父级给一个高度 height