gpt4 book ai didi

.htaccess - @font-face 在 Firefox 中不能跨域工作

转载 作者:行者123 更新时间:2023-11-28 14:00:37 25 4
gpt4 key购买 nike

我正在尝试使用来自 typefront.com 的字体。它适用于所有其他浏览器,但 Firefox 中的安全限制不允许使用来自不同域的字体。

我已经尝试创建一个 .htaccess 文件并添加以下代码片段,但是当我尝试加载该网站时,我收到一个内部服务器错误页面!

<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "http://mydomain.com"
</IfModule>
</FilesMatch>

这是我的 CSS 代码:

@font-face {
font-family: "Gravur-CondensedBold";
src: url("http://typefront.com/fonts/825589026.eot");
src: local("☺"),
url("http://typefront.com/fonts/825589026.woff") format("woff"),
url("http://typefront.com/fonts/825589026.ttf") format("truetype"),
url("http://typefront.com/fonts/825589026.svg") format("svg");
}

@font-face {
font-family: "Gravur-CondensedLight";
src: url("http://typefront.com/fonts/825589027.eot");
src: local("☺"),
url("http://typefront.com/fonts/825589027.woff") format("woff"),
url("http://typefront.com/fonts/825589027.ttf") format("truetype"),
url("http://typefront.com/fonts/825589027.svg") format("svg");
}

谁能帮我解决这个问题?

这是网址:http://www.enjoythisyeah.com

最佳答案

关于.htaccess - @font-face 在 Firefox 中不能跨域工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10383375/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com