Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 我能';不加载webfont_Css_Webfonts - Fatal编程技术网

Css 我能';不加载webfont

Css 我能';不加载webfont,css,webfonts,Css,Webfonts,我上传了一些字体文件到我的网络主机上,并试图将其加载为webfont。但是我似乎不能使用theese,我甚至不知道为什么。如果这是Adobe字体,请确保您在Typekit站点上正确设置了权限。您的开发人员控制台会给您带来哪些错误?我打赌Han Sans不被引用是没有帮助的。我也尝试了使用“Han Sans”作为字体系列名称,但没有任何更改。控制台上出现错误消息,“被CORS策略阻止:请求的资源上不存在“Access Control Allow Origin”标题。”您正在处理的页面也在该域上吗?

我上传了一些字体文件到我的网络主机上,并试图将其加载为webfont。但是我似乎不能使用theese,我甚至不知道为什么。

如果这是Adobe字体,请确保您在Typekit站点上正确设置了权限。

您的开发人员控制台会给您带来哪些错误?我打赌
Han Sans
不被引用是没有帮助的。我也尝试了使用“Han Sans”作为字体系列名称,但没有任何更改。控制台上出现错误消息,“被CORS策略阻止:请求的资源上不存在“Access Control Allow Origin”标题。”您正在处理的页面也在该域上吗?无论您在何处托管字体,字体都不会设置为允许其他域的用户使用其资产/资源。谢谢。我改变了主机服务器,现在工作正常。
@font-face {
    font-family: Han Sans;
    src: url(http://before-the-dawn.com/spoqa-han-sans/han-sans-regular.woff2) format('woff2'),
        url(http://before-the-dawn.com/spoqa-han-sans/han-sans-regular.woff) format('woff'),
        url(http://before-the-dawn.com/spoqa-han-sans/han-sans-regular.ttf) format('truetype');
    font-weight: 500;
    }