我正在尝试使用 VAGRoundedStd-Thin.otf 作为标题的字体。 我得到了字体,并使用 ftp 将它放在我的网站文件夹中。
之后,我将以下代码放入 css 文件中。
@font-face{
font-family:"VAG Rounded W02 Thin";
src:url("rimowaedition.com/VAGRoundedStd-Thin.otf") format("opentype");
}
h2 {
font-family: "VAG Rounded W02 Thin" !important;
}
我很沮丧,开始为代码设置 important 但这并不重要。 关于如何让它使用字体的任何想法。
最佳答案
改成这个
@font-face{
font-family:"VAG Rounded W02 Thin";
src:url("http://rimowaedition.com/VAGRoundedStd-Thin.otf") format("opentype");
}
希望这能奏效!
关于html - 尝试在网站上实现自定义字体。尝试了以下代码但没有成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26579278/