Font Weight with Google Fonts Roboto, normal (400) and bold (700) work, light (300) does not

折月煮酒 提交于 2019-12-18 09:41:15

问题


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; ?


回答1:


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.



来源:https://stackoverflow.com/questions/20525609/font-weight-with-google-fonts-roboto-normal-400-and-bold-700-work-light-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!