IE不支持height:0?那只是IE对空标签默认插入空格的bug而已,overflow:hidden就可以了,这么麻烦干什么.

下面这种方法也不错:

 

.clear {
    clear: both;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
    height: 0;
    visibility:hidden;
}
/* new clearfix */
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html .clearfix  { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2021-10-23
  • 2021-12-14
  • 2022-01-17
  • 2021-12-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2022-01-23
相关资源
相似解决方案