【发布时间】:2025-12-11 10:10:01
【问题描述】:
我在css中使用的是@font-face,如下所示
@font-face {
font-family: 'Gotham';
src: url('../assets/fonts/Gotham Book.otf')format("opentype");
}
body {
background:transparent;
min-height:100%;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
line-height: 1.5em;
font-size:14px;
font-family: Gotham;
color:#fff;
color:rgba(255,255,255,.8);
font-weight: normal;
} 它在 chrome 中完美运行,但在 fire fox 显示为 times new roman 时失败。字体 gotham 已安装在文件夹中,链接与给出的一样。
【问题讨论】:
-
你能在代码 sn-p 中复制你的问题吗?
-
浏览器控制台说什么?查找 404 或 CORS 错误。
-
它只是显示时间新罗马字体
-
Arivind S 对不起,先生,我不能!但如果你指导我,我肯定会的
标签: css font-face font-family