新字体的大小不应该如此

时间:2013-10-24 11:44:08

标签: css css3 fonts font-face

所以我终于在我的WordPress网站上安装了Birch字体。现在字体没有像我期望的那样调整大小(click here)。我试过编辑font-size, line-height, font-weight, font-style, ...似乎没什么用。奇怪的是,在iPhone上它就像一个魅力。

在我的标题中,我添加了此内容。

<style type="text/css" media="screen, print">
@font-face {
font-family: Birch;
    src: url('../wp-content/themes/zenon-lite/fonts/birch.ttf') format('truetype'),
    url('../wp-content/themes/zenon-lite/fonts/birch.eot') format('embedded-opentype'),
    url('../wp-content/themes/zenon-lite/fonts/birch.woff') format('woff'),
    url('../wp-content/themes/zenon-lite/fonts/birch.svg') format('svg');
font-weight: normal;
font-style: normal;
}

body { font-family: Birch, Tahoma; }
p {font-size: 1.5em;}
</style>

1 个答案:

答案 0 :(得分:1)

您已在body上设置了字体大小,但没有其他地方。因此,您的印刷元素将以浏览器默认大小呈现。您还需要在各个组件上定义大小,例如:

CSS:

h1 {
 font-size: 2em;
}
h2 {
 font-size: 1.5em;
}
相关问题