css中清除浮动

在父dom对象上添加class

.clearFloat {

  content: "";

  display: block;

  visibility: hidden;

  height: 0;

  clear: both;

}

原文地址:https://www.cnblogs.com/windcat/p/12537951.html