1

我正在尝试使用类似的东西...

.cufon-font-style-1 { font-size:40px; line-height:-20px; }

它不适用于 IE、FF、Chrome ......

我改变了我的 Docytype 并没有改变......

4

3 回答 3

0

根据 W3C 建议,行高的负值是非法的:
http ://www.w3.org/TR/CSS21/visudet.html#propdef-line-height

根据 Cufon Wiki > Styling
Values 低于 1.2(通常是默认值)的行为就像line-height: 1.2设置了一样。
https://github.com/sorccu/cufon/wiki/styling

如果您希望行高小于 1.2em,您可能需要进入字体 .js 文件并ascent手动更改值:

//MyFont_400.js
...
"panose-1":"0 0 0 0 0 0 0 0 0 0",
"ascent":"800", // adjust this value to match your desired line-height
"descent":"-19"
...
于 2011-08-12T22:58:34.487 回答
0

您可以对 line-height 属性使用负值。看看这个CSS教程

于 2010-08-12T18:54:52.960 回答
-1

您只需添加 *line-height 即行高并调整高度。当两者都在 IE 和 FF 中时,只需给容器填充。

于 2011-01-04T06:40:10.783 回答