3

当应用负字母间距时,我遇到了 Firefox 以不同于其他浏览器的方式呈现文本的问题:

h2{font-size:1.6em;font-weight:bold;color:#999;letter-spacing:-0.10em;}

<h2>Time</h2>(approx)

这是在大多数浏览器中呈现的文本:http: //img707.imageshack.us/i/font2x.png/

这是在 Firefox 中呈现的文本:http: //img444.imageshack.us/i/font1.png/

编辑:它们是直接截图,图像是相同的分辨率。

有关如何解决此问题的任何想法?

4

3 回答 3

1

我不知道为什么,但是如果您在声明中使用pt了 instead (但保留for ,Firefox 应该像其他浏览器一样呈现您的文本。emfont-sizeemletter-spacing

h2{font-size:18pt;font-weight:bold;color:#999;letter-spacing:-0.10em;}
于 2012-08-07T15:35:59.020 回答
0

将声明添加width: 100%;h2规则以触发“其他”浏览器中的布局。

于 2010-07-08T15:18:32.787 回答
0

我通过重置css修复了它。只需将以下链接添加到您的 html 头。

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/reset/reset-min.css">

更多信息可以在这里找到。http://developer.yahoo.com/yui/reset/

于 2013-04-21T16:53:21.620 回答