开发者

Cufon: line-height problem

I'm trying to use something li开发者_StackOverflow中文版ke that...

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

it's not working in IE, FF, Chrome...

i changed my Docytype and nothing changed...


You can use negative value with the line-height property. Take a look at this CSS tutorial


According to W3C Recommendations, negative values for line-height are illegal:
http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height

According to Cufon Wiki > Styling
Values lower than 1.2 (which is usually the default) behave as if line-height: 1.2 was set.
https://github.com/sorccu/cufon/wiki/styling

If you want your line height smaller than 1.2em, you might have to go into the font .js file and change the value of the ascent manually:

//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"
...


you just add *line-height for ie line height and adjust height. when both are in IE and FF same just give the container padding .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜