css - Google Webfonts 无法正确呈现

标签 css google-chrome webfonts google-webfonts

我正在使用 Roboto我网站中的字体,它在 Chrome (Windows) 中呈现如下所示

enter image description here

字体在 iOS 中呈现正常。

我该如何解决这个问题?任何帮助表示赞赏:)

最佳答案

我遇到了类似的问题。 而是使用谷歌提供的标准代码,

<link href='https://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'>

我添加了一个 crossorigin="anonymous" 属性标签。

<link href='https://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css' crossorigin="anonymous">

老实说,我不知道真正的原因,但它奏效了。希望这对你也有用。

关于css - Google Webfonts 无法正确呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16824540/

相关文章:

css - 调整屏幕大小时背景图像响应空白

javascript - 我如何在不同的 php 页面上回显范围 slider 的实时值?

javascript - 在 Chrome 中加载页面后如何使用 JavaScript 显示文件对话框

css - 是否可以添加 Myriad pro 字体,就像离线 Web 应用程序的自定义字体一样

css - 使用 Asset Pipeline 规避 IE8 CSS 文件数限制

html - UL 不会在 div 的中心对齐

css - 向网站添加多种 Icomoon 字体

Font-Awesome 字体 (woff) 未通过 Netlify CDN 加载

javascript - 如何仅使用 chrome 开发工具在多个站点中测试脚本?

javascript - 加载 Angular 应用程序时,Chrome devtools 挂起