Ultimate Edition One:
. clearfix:after {
Content: "\200b";
Display:block;
height:0;
Clear:both;
}
. clearfix {*zoom:1;} /*ie/7/6*/
Explanation: Content: "\200b"; this parameter, the Unicode character character has a "0 width space", that is u+200b, instead of the original ".", you can reduce the amount of code. And no longer use Visibility:hidden.
. clearfix:before,.clearfix:after{
Content: "";
display:table;
}
. Clearfix:after{clear:both;}
. clearfix{
*zoom:1;/*ie/7/6*/
}
The two ultimate version of the code are very concise, the ultimate version of one and two can be used, the above code has been tested, we hurriedly use it, if there is any problem please timely feedback with me, if you still stay in the old code of Clearfix the time to quickly update the code bar.
This article is from the "9481468" blog, please be sure to keep this source http://9491468.blog.51cto.com/9481468/1619021
Clearfix Clear Float