IE6显示1px高度的bug

在IE6下运行以下代码测试:

提示:你可以先修改部分代码再运行。

得到结果是2,在其他浏览器下得到的都是预期的1,经过测试发现只要删除背景色属性就正常
这实在是个匪夷所思的问题

最后经新软群中hyne大大提醒,在div中加入一个 就能解决(注:直接空格不行),即:

  1. <div id="test" style="font-size: 1px; height: 1px; line-height: 1px; margin: 0 1px;background: #333">
  2. &nbsp;
  3. </div>

本来以为自己已经把IE6的各种问题触碰的差不多了,竟然还有新的……

17fav 收藏本文
标签:, , ,

相关日志 随机文章

Comments

One Response to “IE6显示1px高度的bug”

  1. qatang on 2008-10-14 9:28 am

    傻逼ie

    [Reply]

Leave a Reply




请输入验证码

Use "<coolcode></coolcode>" to publish your code.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

京ICP备05059555号

收藏 & 分享

Powered by 17fav.com