Div标签的字体未显示在Internet上

时间:2015-11-05 13:23:00

标签: html css fonts

我有本地显示的字体,已将文件上传到网站,但它仍然没有出现在我尝试过的几个浏览器上。我在stylesheet.css和main.css中尝试了很多不同的方法,但没有任何工作。

任何人都可以帮助我看看我哪里找不到合适的东西吗?

只有" Sarah Brody"我希望添加一个脚本字体。

提前致谢... sarahbrody.me是网站。

1 个答案:

答案 0 :(得分:0)

您必须在CSS中定义字体。像这样:

@font-face {
  font-family: "Aphrodite Stylistic";
  src: url('font/aphrodite-stylistic.eot');
  src: url('font/aphrodite-stylistic.eot?#iefix') format('embedded-opentype'),
       url('font/aphrodite-stylistic.woff2') format('woff2'),
       url('font/aphrodite-stylistic.woff') format('woff'),
       url('font/aphrodite-stylistic.ttf') format('truetype');
  font-weight: normal;
}

我注意到在main.css中你正在导入webfonts/Great_Vibes/stylesheet.css但是该文件丢失了。这可能是导致问题的原因。检查它的URL。

相关问题