gpt4 book ai didi

CSS - 不能包含 .ttf 文件

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

我想为我的页面使用 fontlero 字体,我下载了 .ttf 文件。我将它包含在我的主要 CSS 中,但这给了我一些其他字体。这是我的 CSS 代码:

@font-face {
font-family: FONTLERO;
src: url(fonts/FONTLERO.TTF);
}

.customfont {
font-family: "FONTLERO";
src: url('../fonts/FONTLERO.TTF') format('embedded-opentype'),
url('../fonts/FONTLERO.TTF') format('opentype');
}

.story h1 {
font-family: FONTLERO;
font-size: 120px;
}

最佳答案

路径应该在 CSS 文件夹内,如下所示

css/fonts/FONTLERO.TTF

关于CSS - 不能包含 .ttf 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53239331/

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