Fonts 谷歌字体给出:否';访问控制允许原点';请求的资源上存在标头

Fonts 谷歌字体给出:否';访问控制允许原点';请求的资源上存在标头,fonts,google-font-api,Fonts,Google Font Api,我正在尝试使用谷歌字体“Oswald”。当我将其嵌入到我的页面中时: Chrome抛出以下错误: XMLHttpRequest cannot load http://fonts.googleapis.com/css?family=Oswald:400,300,700. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://<<redacted>

我正在尝试使用谷歌字体“Oswald”。当我将其嵌入到我的页面中时:


Chrome抛出以下错误:

XMLHttpRequest cannot load http://fonts.googleapis.com/css?family=Oswald:400,300,700. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://<<redacted>>' is therefore not allowed access. 
XMLHttpRequest无法加载http://fonts.googleapis.com/css?family=Oswald:400,300,700. 请求的资源上不存在“Access Control Allow Origin”标头。因此,不允许访问源“http://”。

这仅仅是谷歌方面的一个错误,还是我做错了什么?

事实证明,这与

解决方案是将“data noprefix”添加到链接标签中,如下所示:

<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css' data-noprefix>


顺便说一句,您不应该在HTML标记中使用“分隔参数值”。这不是标准的,而且完全是错误的。@Qualcuno,嗯,谢谢,但这是直接从谷歌字体页面复制的。谢谢,但是我以前在一些浏览器中遇到过//的问题。如果站点没有SSL证书,我不明白这有什么关系。不,没有,但这意味着您无法安装SSL,否则会导致通知。我添加了“data noprefix”,但仍会收到错误。
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css' data-noprefix>