请教一下,这种方法清除浮动,主流浏览器够了吗 ie9以上

  ul {
display: table;
content: "";
&:after {// 用了sass 或less的写法
  clear: both;
}
li {
  float: left;
    }
  }
阅读 1.7k
1 个回答

足够兼容了。
要写在伪元素里边。

&:after {
    clear: both;
    display: table;
    content: "";
}
推荐问题