Introduction to clearing floats (clearfix) in css

王林
Release: 2020-05-09 09:09:25
forward
2784 people have browsed it

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的兼容性设置*/}
Copy after login

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!

Related labels:
css
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template