IE6空Div添加边距-修复

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IE6空Div添加边距-修复相关的知识,希望对你有一定的参考价值。

For instances where you have an empty div that is less than about 10-15px in height. IE assumes it should contain something and allots room for text.

I first found this on the webdeveloper.com forums. The fix here is ultimately the "font-size:0" declaration. The rest are for good measure...
  1. div{font-size:0;line-height:0;margin:0;padding:0;}

以上是关于IE6空Div添加边距-修复的主要内容,如果未能解决你的问题,请参考以下文章

CSS IE6空Div添加保证金 - 修复

IE6双倍边距-IE6双倍边距的bug

浮动后IE6双倍边距问题

PNG IE6bug修复

IE6 中的奇怪边距

解决IE6双倍边距BUG