嵌套块元素塌陷问题 问题描述 解决方案 1. 父框定义边框 2. 给父框定义内边距 3.overflow:hidden 4. display:flow-root 问题描述 当使用margin定义块元素的垂直外边距时,有可能会出现垂直外边距塌陷问题,比如以下情况: .father { width: 200px; height: 200px; background-color: yellow; } .son { width: 100px; height: 100px; background-color: blue; } <div class