【问题标题】:Font doesn't show on iPhone in Safari字体在 Safari 中的 iPhone 上不显示
【发布时间】:2025-12-04 20:20:04
【问题描述】:

我的字体在 iPhone 上的 Safari 中不显示。我可以选择并复制文本,但我什么也没看到?

这是我正在使用的字体代码:

@font-face {font-family:'TheSerifBoldPlain'; src: url('fonts/TheSerifBoldPlain.eot'); src: url('fonts/TheSerifBoldPlain.eot') format('embedded-opentype'), url('fonts/TheSerifBoldPlain.woff2') format('woff2'), url('fonts/TheSerifBoldPlain.woff') format('woff'), url('fonts/TheSerifBoldPlain.ttf') format('truetype'), url('fonts/TheSerifBoldPlain.svg#TheSerifBoldPlain') format('svg');font-weight: normal;font-style: normal;}

它只在 iPhone 上不起作用。

【问题讨论】:

  • 我建议将字体文件的所有名称更改为小写,然后更新 css。正如我在另一篇文章中所读到的,移动 safari 在资源方面区分大小写,而桌面则不区分大小写。

标签: html ios css iphone safari


【解决方案1】:

我认为是因为您的字体的 .eot 扩展名 请检查这个

http://caniuse.com/#search=eot

使用woff更好,因为它支持不同的浏览器

【讨论】:

    最近更新 更多