用CSS 的定义一个DIV的高度时,在IE7 ,IE8浏览器下可以正常显示。但是在IE 6 中,height 在10px以下就无法定义了。这点跟表格有点类似。解决的方法如下:
法一: 定义overflow属性。比如想定义一个高度为2px 的线条。

    <div style="height:2px;overflow:hidden;background:#000000;width:778px;"></div>  

法二: 将div 的字体大小属性fontsize 设置为跟高度相同。

   1. <div style="height:2px;font-size:2px;background:#000000;width:778px;">&nbps;</div>  

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2022-01-15
  • 2021-11-18
  • 2021-07-22
  • 2021-09-30
  • 2021-07-09
  • 2021-05-24
猜你喜欢
  • 2021-10-19
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-12-21
相关资源
相似解决方案