Last active
August 29, 2015 13:57
-
-
Save liveme/9680112 to your computer and use it in GitHub Desktop.
clearfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: 闭合浮动 | |
*@ Update: 2013-02-17 | |
*@ Usage: 在需要闭合浮动的元素上(浮动元素的父容器)加 .clearfix | |
*/ | |
.clearfix:after { | |
visibility: hidden; | |
display: block; | |
content: "."; | |
font-size: 0; | |
height: 0; | |
clear: both; | |
} | |
.clearfix { | |
*zoom: 1; /* IE6-7 触发 hasLayout */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment