欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

清除浮动clearfix

程序员文章站 2022-04-15 23:29:45
```css.clearfix:after, .clearfix:before { content: " "; display: table;}.clearfix:after { clear: both;}.clearfix{zoom:1;/*为IE6,7的兼容性设置*/}``` ......
.clearfix:after, .clearfix:before {
    content: " ";
    display: table;
}
.clearfix:after {
    clear: both;
}
.clearfix{zoom:1;/*为ie6,7的兼容性设置*/}