.cl:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }spa
.cl { zoom: 1; /* for IE6 IE7 */ }it
1. .clearfloat {clear:both;height:0;font-size: 1px;line-height: 0px; overflow:hidden;}io
好處 :兼容性好不會出現奇怪的錯位兼容性
缺點:在IE6 和IE7下父元素必須設置寬度才能夠起做用float
2. .clear1 {overflow:auto;zoom:1;}方法
好處:代碼簡潔隨用隨拿,信手拈來。tab
缺點:容易出現奇怪的滾動框(很容易的哦~~!兼容
.clear{clear:both;height:0px;overflow:hidden;}di
.tab-con:after {clear:both;content: ".";display:block; height:0;overflow:hidden;visibility:hidden;}vi
.clearit {clear: both;}
.clearfix:after { clear: both; content: ".";display: block; height: 0;visibility: hidden;}
.clearfix {display: inline-block;}
.y-tablist { position: relative;}
.y-tablist:after {clear:both;content: ".";display:block;height: 0;overflow: hidden;visibility:hidden;}