gpt4 book ai didi

html - 不能将 fontface 用于自定义字体

转载 作者:行者123 更新时间:2023-11-28 01:07:04 24 4
gpt4 key购买 nike

我一直在尝试使用自定义字体
但它没有显示在我的网站上。

/*TEXT*/
p.fontcheck {
font-family: MTCORSVA bold;
font-weight: normal;
font-style: normal;
}


/*fonts*/
@font-face {
font-family: "MTCORSVA";
src: url("/eccube_1/html/template/default/css/fonts/MTCORSVA.TTF") format("TTF");
}
<p class="fontcheck">HELLO TEST</p>

我也在整个路径中尝试了 URL,或者也尝试了插入 HTTP 或 HTTPS
结果没有出现。
我在服务器中的字体原始路径是

/public_html/azlily.bex.jp/eccube_1/html/template/default/css/fonts/MTCORSVA.TTF

最佳答案

试试这个,这有效!

/*TEXT*/
p.fontcheck {
font-family: MTCORSVA bold;
font-weight: normal;
font-style: normal;
}


/*fonts*/
@font-face {
font-family: MTCORSVA;
src: url(http://azlily.bex.jp/eccube_1/html/template/default/css/fonts/MTCORSVA.TTF);
}
<p class="fontcheck">HELLO TEST</p>

关于html - 不能将 fontface 用于自定义字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52305413/

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