【问题标题】:<a style=display:inline-block;height:8px;width:8px;></a> IE6: only correct size with "&nbsp;"?<a style=display:inline-block;height:8px;width:8px;></a> IE6:只有正确的大小与“ ”?
【发布时间】:2011-01-12 00:07:37
【问题描述】:

Internet Explorer (6.0):以下代码显示不同的大小:这是为什么?

<a style=display:inline-block;height:8px></a>
<a style=display:inline-block;height:8px>&nbsp;</a>

Chromium 和 FF(我的首选浏览器)两次都显示正确的大小,但在工作中我不得不使用 IE6.0。

有什么办法可以防止这种行为吗?

【问题讨论】:

  • @SimeVidas: &lt;?xml version=\"1.0\" encoding=\"iso-8859-1\"?&gt; &lt;meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1\" /&gt;

标签: css internet-explorer internet-explorer-6 height width


【解决方案1】:

Display:inline-block 不适用于 IE6 中的空元素 - 因此 height 元素将被忽略,因为它需要显示标签。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2012-05-20
  • 2011-04-14
  • 2013-02-27
  • 1970-01-01
  • 2013-03-19
  • 2012-10-28
  • 2010-09-09
  • 1970-01-01
相关资源
最近更新 更多