【发布时间】:2021-08-10 18:53:40
【问题描述】:
我的 css 无法加载 @font-face,它可以在 Firefox 上运行,然后我尝试解决“不支持其他浏览器”的问题。现在它根本不起作用.QAQ 我认为这是因为 *.otf 文件转换为 *.woff 格式不支持 zh-hant。但我检查了几次。它没有加载到英文部分。 所以我确实需要帮助。
@font-face {
font-family: "CJK-Regular";
font-display: swap;
src: url(https://time-sight.com/service/wp-includes/fonts/NotoSansCJKtc-Regular.eot);
src: url(https://time-sight.com/service/wp-includes/fonts/NotoSansCJKtc-Regular.eot?#iefix) format("embedded-opentype"),
url("https://time-sight.com/service/wp-includes/fonts/NotoSansCJKtc-Regular.woff2") format("woff2"),
url("https://time-sight.com/service/wp-includes/fonts/NotoSansCJKtc-Regular.woff") format("woff"),
url("https://time-sight.com/service/wp-includes/fonts/NotoSansCJKtc-Regular.otf") format("opentype");}
.alt-font{font-family:'CJK-Regular'} 我曾试图自己弄清楚,但我花了几天时间仍然零进展。
【问题讨论】:
-
我检查了以下内容:1.我的服务器中存在所有字体文件,并且名称与我的代码完全相同。 2.所有文件都设置为644权限。 3.再次上传文件并使用不同的应用程序进行转换。 4.尝试单独包含css文件(仅包含@font-face的一部分)5.检查它是否在我打开chrome->F12->Source->文件时加载了源列表6.是否使用",' , (none) 引用 url abs 路径。我不得不说我不知道该怎么做。所以我必须发布这些以寻求帮助
-
请在问题本身中包含您在评论中提到的内容。