html - 尝试在网站上实现自定义字体。尝试了以下代码但没有成功

标签 html css fonts

我正在尝试使用 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 但这并不重要。 关于如何让它使用字体的任何想法。

网站链接:http://rimowaedition.com/

最佳答案

改成这个

@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/

相关文章:

html - 我如何在另一个容器内水平和垂直居中容器?

html - 我如何通知 Mac OSX 的缩放按钮关于网站的最佳尺寸

javascript - 设置脚本添加的 IFRAME 的innerHTML

ipad - 在 iOS 6 中使用 Webkit 变换和过渡时如何修复闪烁

html - 我怎样才能让我的卡片一张一张叠放?

html - Facebook 评论插件在滚动时覆盖我的标题 div

html - 更改背景不透明度保留文本

css - 未加载粗体 @font-face

java - Swing 组件不显示泰文字符

python - 在 python webkit 中使用 svg 字体