字体系列查询不显示

font family query not displaying

我正在尝试使用此代码更改字体。到所需的值,字体的所有文件都保存在与 css 和 html 文件相同的目录中。我找不到错误

@font-face {

    font-family:'newfont';
    src:url('../website/fonts/kulminoituva.eot');
    src:url('../website/fonts/kulminoituva.eot?#iefix') format('embedded-opentype'),
        url('../website/fonts/kulminoituva.woff') format('woff'),
        url('../website/fonts/kulminoituva.ttf') format('truetype');
    font-weight:normal;
    font-style:normal;
}

和调用时的代码

ul li {
    font-family: 'newfont', helvetica, sans-serif;
}

更新

我在给出文件名后就运行了。没有任何文件路径。括号会自动检测字体。 感谢@Calvt 和 appleElmi

正如@CalvT 所暗示的那样,这必须是一个参考问题。在描述中,您提到

all the files of the font are saved in the same directory as css and html files

然而,@font-face 声明表明字体位于 /website/fonts

下的父目录 (..) 中

检查浏览器的开发者工具,确保没有错误提示:

Failed to load resource: net::ERR_FILE_NOT_FOUND

如果字体 保存在与 css 和 html 文件相同的目录中 ,则在名为 website[=] 的文件夹下32=],那么 @font-face 声明应该是

@font-face {
    font-family:'newfont';
    src:url('website/fonts/kulminoituva.eot');
    src:url('website/fonts/kulminoituva.eot?#iefix') format('embedded-opentype'),
        url('website/fonts/kulminoituva.woff') format('woff'),
        url('website/fonts/kulminoituva.ttf') format('truetype');
    font-weight:normal;
    font-style:normal;
}

如果它们保存在与 css 和 html 文件相同的目录中, 在名为 fonts[=32= 的文件夹下],然后从您的 @font-face 声明

中删除 website/