Home >Web Front-end >CSS Tutorial >Introduction to clearing floats (clearfix) in css
Clear floating clearfix
(Video tutorial recommendation: css video tutorial)
Example code:
.clearfix:after, .clearfix:before { content: " "; display: table; } .clearfix:after { clear: both; } .clearfix{zoom:1;/*为IE6,7的兼容性设置*/}
Recommended tutorial: css quick start
The above is the detailed content of Introduction to clearing floats (clearfix) in css. For more information, please follow other related articles on the PHP Chinese website!