.clearfix::before,.clearfix::after { /* 解决外边距折叠 */ content: ""; display: table; /* 解决高度塌陷 */ clear: both;}