.cf:after,.cf:before {content: " "; display: table;}

.cf:after {clear: both;}
:before是因为table类型能生成独立的bfc,防止上边距塌陷,
:after负责清除浮动,防止父级高度塌陷;配合使用,代码少,效率高。


相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2022-01-06
  • 2021-07-16
  • 2021-07-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-01-07
  • 2022-12-23
  • 2021-08-13
相关资源
相似解决方案