我正在尝试使用类似的东西...
.cufon-font-style-1 { font-size:40px; line-height:-20px; }
它不适用于 IE、FF、Chrome ......
我改变了我的 Docytype 并没有改变......
我正在尝试使用类似的东西...
.cufon-font-style-1 { font-size:40px; line-height:-20px; }
它不适用于 IE、FF、Chrome ......
我改变了我的 Docytype 并没有改变......
根据 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"
...
您可以对 line-height 属性使用负值。看看这个CSS教程
您只需添加 *line-height 即行高并调整高度。当两者都在 IE 和 FF 中时,只需给容器填充。