html - 如何将 .woff 字体导入我的网站

标签 html css .net fonts webfonts

我在我的网站上使用@font-face 但它不起作用,.woff 文件出现 404 错误。我的字体位于根目录但找不到字体

这是我的字体 css 文件,有什么问题吗?

@font-face {
    font-family: '---_2regular';
    src: url('----regular-webfont.eot');
    src: url('----regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('----regular-webfont.woff') format('woff'),
         url('----regular-webfont.ttf') format('truetype'),
         url('---regular-webfont.svg#---_2regular') format('svg');
    font-weight: normal;
    font-style: normal;

}

最佳答案

您必须联系您的托管公司。然后他们必须为 mime 类型添加 .woff 扩展名。 可能,你的问题可以解决。

关于html - 如何将 .woff 字体导入我的网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21333997/

相关文章:

javascript - Bootstrap - 日期时间选择器添加像今天这样的自定义按钮

javascript - Jquery 同时在两个单独的 div 中移动内容

c# - 错误 : A project with an out put type of class library

c# - IList 和 IEnumerable 上的扩展方法是否具有相同的名称?

jquery - 表单中的csrfmiddlewaretoken和cookie中的csrfotken不同

html - 有没有办法让 flexbox 与 Django 一起工作?

html - 当我调整它的大小时,我的 html 网页乱七八糟

css - 使用选择器选择 CSS 中元素的前一个兄弟

html - 垂直对齐的居中图像

c# - 我可以在 C# 中通过引用传递原始类型吗?