我一直在尝试在我的网页上添加我自己的字体,但我仍然不知道如何使用 Font Squirrel 转换器。我下载了一个免费的 .ttf 字体,并使用生成器进行了转换,如下所示:
@font-face
{
font-family: 'AbiteRegular';
src: url('fonts/abite-webfont.eot');
src: url('fonts/abite-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/abite-webfont.woff') format('woff'),
url('fonts/abite-webfont.ttf') format('truetype'),
url('fonts/abite-webfont.svg#AbiteRegular') format('svg');
font-weight: normal;
font-style: normal;
}
fonts是我转换 .ttf 文件的文件夹。我像这样使用它:
body
{
font-family: 'AbiteRegular';
}
所有这些配置都在 .css 文件中。但正文忽略了这一点。你知道为什么会发生吗?