Introduction to clearing floats (clearfix) in css

王林
Release: 2020-05-09 09:09:25
forward
2499 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 [email protected]
Latest issues
Popular Tutorials
More>
Latest downloads
More>
web effects
Website source code
Website materials
Front end template
About us Disclaimer Sitemap
PHP Chinese website:Public welfare online PHP training,Help PHP learners grow quickly!