使用溢出属性来清除浮动

将 overflow 值设置为 hidden,auto 或 scroll 到元素,将清除该元素中的所有浮点数。

注意: 使用 overflow:scroll 将始终显示滚动框