相关疑难解决方法(0)

如何调试@ font-face问题?

我有以下CSS代码:

// theMixPlainSemiBold
@font-face {
    font-family: 'theMixPlainSemiBold';
    src: url('/css/fonts/... .eot');
    src: url('/css/fonts/... .eot?#iefix') format('embedded-opentype'),
         url('/css/fonts/... .svg#TheMixPlainSemiBoldSemiBold') format('svg'),
         url('/css/fonts/... .woff') format('woff'),
         url('/css/fonts/... .ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)

我希望这会创建一个名为的新字体系列theMixPlainSemiBold.

导入此字体后,我做:

.box {
    ...
    font-family: 'theMixPlainSemiBold', sans-serif;
    ...
}
Run Code Online (Sandbox Code Playgroud)

我有一个boxtheMixPlainSemiBold字体系列的类.

当我打开页面时,我看到了sans-serif字体.box.

可能是什么问题?其他本地Web字体也是如此,而它与Google字体一起使用效果很好.

我该如何调试字体问题?我没有在开发人员工具中看到任何错误/警告.它看起来像我没有从本地文件加载字体...

html css fonts

15
推荐指数
2
解决办法
1万
查看次数

标签 统计

css ×1

fonts ×1

html ×1