当站点是服务器而不是https时,字体看起来不同

pea*_*guy 0 css https http google-webfonts

嗨,我遇到了问题

当用https查看网站时,所有内容都变为粗体

https://www.healthinsurance.uk.net/

什么时候看出来的大胆已经消失了?

我以前从未见过这个

Kar*_*ren 7

一切都不是大胆的,但你得到备份字体(sans-serif)而不是你想要的.

发生这种情况是因为您尝试从Google Webfonts加载的字体硬编码为您的常规http style.css.

@import url(http://fonts.googleapis.com/css?family=News+Cycle:400,700);
Run Code Online (Sandbox Code Playgroud)

将该行更改为以下内容,它应根据当前加载的页面选择http或https.

@import url(//fonts.googleapis.com/css?family=News+Cycle:400,700);
Run Code Online (Sandbox Code Playgroud)