html - 无法应用下载的字体

标签 html css fonts

我在网站的英文版中使用 Nunito Sans 并在此处看到:https://localfonts.eu/?s=Nunito+Sans&post_type=product 还有保加利亚语版本的字体,这正是我需要的。

我尝试下载并将其添加到我的元素文件夹中。

@font-face {
  font-family: NunitoSans;
  src: url('fonts/NunitoSans-Light.ttf');
}

body {
    font-family: NunitoSans;
}

不幸的是,这没有任何效果。

最佳答案

Replace the existing source URL with the new URL you created by uploading each file.

By default, the source URL location is set within the downloaded Web Font Kit. It needs to be replaced by the location on your server.

引用: https://www.pagecloud.com/blog/how-to-add-custom-fonts-to-any-website

关于html - 无法应用下载的字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55610650/

相关文章:

javascript - 仅在需要时将 div 更改为 active 类

javascript - Javascript/Html 中的复选框

css - nth-child() 不显示在打印媒体中

javascript - 隐藏垂直滚动条时避免javascript和局部变量元素右跳

css - Google PageSpeed Insights 声称我正在加载网站未使用的字体

javascript - IE8 支持使用 respond.js 的媒体查询

JQuery Cycle NoConflict $ 问题

html - 字体在 Ipad2 和 iphone4 上显示两次 - 在其他桌面浏览器上工作正常

winapi - 当 Windows 字体名称前缀为 '@' 时,它意味着什么?

jquery - 限制 HTML 下拉列表打开时显示的项目