gpt4 book ai didi

css - 新字体大小不合适

转载 作者:太空宇宙 更新时间:2023-11-04 14:25:47 25 4
gpt4 key购买 nike

所以我终于在我的 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>

最佳答案

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

CSS:

h1 {
font-size: 2em;
}
h2 {
font-size: 1.5em;
}

关于css - 新字体大小不合适,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19564988/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com