字体重量与谷歌字体Roboto,正常(400)和粗体(700)工作,光(300)不 [英] Font Weight with Google Fonts Roboto, normal (400) and bold (700) work, light (300) does not

查看:1085
本文介绍了字体重量与谷歌字体Roboto,正常(400)和粗体(700)工作,光(300)不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 链接:https://50.62.213.246/gktest/ 

搜索栏中的占位符文本和输入文本不会响应font-weight:300;
如果我尝试font-weight:700;文本是粗体。
normal = 400,light = 300,bold = 700等等



所以我的问题是为什么文本不会出现light-font-weight: ?

解决方案

您的链接使用 https 协议。

http vs https - 对于协议无关参考,使用 // fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700|Roboto:400,300,700,500,100



基本上您的链接使用 https ,但是您引用了 http 版本的字体。因此,如果您使用 https - 它是一个安全的页面,因此,它将阻止非安全资源(特别是从第三方网站),如 javascript 。或至少可能会显示警告,说明网站尝试加载非安全内容。


Link: https://50.62.213.246/gktest/

The placeholder text and input text in the search bar will not respond to font-weight: 300; If I try font-weight: 700; the text is bold. normal = 400, light = 300, bold = 700, etc

So my question is why does the text not appear light with font-weight: 300; ?

解决方案

Your link uses the https protocol.

http vs https - for a protocol agnostic reference, use //fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700|Roboto:400,300,700,500,100

Basically your link uses https but you're referencing the http version of the font. So if you use https - it's a secure page, and as such, it will block non secure resources (especially from 3rd party websites), such as javascript. Or at least may display a warning, explaining that the site is trying to load non-secure content.

这篇关于字体重量与谷歌字体Roboto,正常(400)和粗体(700)工作,光(300)不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆