我在我的网站上使用@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/