【发布时间】:2014-10-30 21:55:33
【问题描述】:
我正在尝试使用谷歌字体“Oswald”。当我将它嵌入到我的页面中时recommended way:
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'>
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.
这只是谷歌的错误还是我做错了什么?
【问题讨论】:
-
顺便说一句,您不应该使用 ' 来分隔 HTML 标记中的参数值。这不标准,而且完全是错误的。
-
@Qualcuno 嗯,谢谢,但这是直接从 Google 字体页面复制的。 google.com/fonts#UsePlace:use/Collection:Oswald
标签: fonts google-font-api