font-weight:300 doesn't work in Chrome

故事扮演 提交于 2019-12-24 16:25:23

问题


I'm having an issue with font-weight in Chrome. Any font weights lower than the default weight of 400 will render at the default weight, overriding the font-weight:300 CSS attribute. Font weights higher than the default weight will render as expected in Chrome, and all font weights render properly in Firefox. Why is this happening?

For example:

<div class="light">Light</div>

with CSS

.light {font-weight:300;}

will render as if font-weight:400.

jsfiddle, compare view in Firefox and Chrome

EDIT: Screenshots of the text in both Chrome and Firefox, running in Fedora 20:

Chrome (incorrect rendering): i.imgur.com/MCHHTlF.png

Firefox (correct rendering): i.imgur.com/tTH9rPd.png

Sorry, I can only post 2 links maximum, apparently.


回答1:


Try changing the font family to 'Open Sans Light', sans-serif;. I had the same problem and this worked for me. It also worked in your provided fiddle.



来源:https://stackoverflow.com/questions/24111985/font-weight300-doesnt-work-in-chrome

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