【发布时间】:2012-08-08 21:06:08
【问题描述】:
所以,我设计了一个使用 HTML/CSS 的单页布局。该页面可以在这里找到:
因此,页面的标题文本是我使用 font-face 属性加载的自定义字体。字体大小和字体在 chrome 上是完美的,但在 Firefox 上更大,有时字体本身看起来有点不同。为什么会这样?整个页面都因为标题字体而被打乱了!
我的字体代码:
@font-face {
font-family: "logotext";
src: url(http://letsrob.org/css/BEBAS.ttf) format("truetype");
}
@font-face {
font-family: "captiontext";
src: url(http://letsrob.org/css/Franchise-Bold-hinted.ttf) format("truetype");
}
我的标题 CSS 类:
<div id="banner" style="margin-top:20px;color:white;font-weight:bold;font-size:1.75em;font-family:logotext;text-align:center;">Reclaim Our Beaches</div>
<div style="color:white;font-weight:bold;font-size:3em;font-family:captiontext;text-align:center;margin-top:20px;">ROB SYMPOSIUM: Talking trash, Exposing waste</div>
<div style="color:white;font-weight:bold;font-size:1.5em;font-family:captiontext;text-align:center;margin-top:20px;">10AM to 5PM, 18 & 19th AUGUST,2012</div>
<div style="color:white;font-weight:bold;font-size:1.5em;font-family:captiontext;text-align:center;margin-top:10px;">Conference Hall, School of Media Studies, Loyola College, Chennai</div>
请使用 Firefox 访问该页面以查看中断情况。它在 chrome 上运行得非常好!
提前致谢
【问题讨论】:
标签: html css font-face font-size truetype