酷吧你我他吧 关注:4贴子:95
  • 5回复贴,共1
display:inline-block;......
float:left;
.........
会触发bfc


IP属地:北京1楼2016-09-27 19:54回复
    清除浮动业内最高尚的办法 :before :after 伪类


    IP属地:北京2楼2016-09-27 19:55
    回复
      .clearfix:before,/*清除浮动 display:flex可代替float*/
      .clearfix:after{
      content: " ";
      display: block;
      height: 0;
      clear: both;
      visibility: hidden;
      }
      .clearfix:after{
      clear: both;
      }


      IP属地:北京4楼2016-09-27 19:58
      回复
        最优雅
        .clearfix:before,
        .clearfix:after{
        content: " ";
        display: table;
        }
        .clearfix:after{
        clear: both;
        }


        IP属地:北京5楼2016-09-27 19:59
        回复
          em rem
          100% 1em=16px


          IP属地:北京6楼2016-09-27 20:02
          收起回复