已安装Bree常规字体但未在网站中显示

时间:2018-04-23 08:46:01

标签: css fonts

Hy伙计们,我在这个网站上安装了Bree Regular字体:http://fontsgeek.com/fonts/Bree-Regular。当我尝试使用它时,文本不会改变:

.font{ font-family: "Bree Rg"; }

我该如何解决?

编辑:这是我使用format("opentype")时遇到的错误:

enter image description here

2 个答案:

答案 0 :(得分:0)

html 文件中的 Head 中加入: -

<link href='https://fonts.googleapis.com/css?family=Bree Regular' rel='stylesheet'>

然后试试。

答案 1 :(得分:0)

您应该在CSS样式表的开头添加@font-face

@font-face {
    font-family: "Bree Rg";
    src: url("path/to/your/font/folder/Bree_Regular.otf") format("opentype");
}