我試圖用類似的東西...的Cufón:行高問題
.cufon-font-style-1 { font-size:40px; line-height:-20px; }
它不是在IE,FF,Chrome的工作......
我改變了我的Docytype並沒有什麼改變...
我試圖用類似的東西...的Cufón:行高問題
.cufon-font-style-1 { font-size:40px; line-height:-20px; }
它不是在IE,FF,Chrome的工作......
我改變了我的Docytype並沒有什麼改變...
您可以對line-height屬性使用負值。看看這個CSS教程
你只要添加*線高度爲ie行高和調整高度。當兩者都在IE和FF相同只是給容器填充。
根據W3C推薦標準,用於行高的負值是非法:
http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height
據的Cufón維基>的樣式
值低於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"
...