开发者

How Do I get 'font-weight: lighter' to work in Google Chrome?

There doesn't appear t开发者_如何转开发o be any difference between 'font-weight: normal' and 'font-weight: bold' in Google Chrome (and probably Safari). Has anyone found a way to invoke the 'font-weight: thinner' in Chrome the way that Firefox does?


This appears to be a known issue in Chrome fixed in latest development builds:

There is a temporary workaround you can also try:

To enable the font-weight property on a @font-face font which doesn't have a bold font defined, you need to explicitly define font-weight:normal; and font-style:normal; in the @font-face definition. Example:

@font-face {
    font-family: 'GriffosFont Regular';
    font-weight: normal;
    font-style: normal;
    src: url('fonts/GriffosFont.eot');
    src: local('GriffosFont Regular'), local('GriffosFont'), url('fonts/GriffosFont.woff') format('woff'), url('fonts/GriffosFont.\
ttf') format('truetype'), url('fonts/GriffosFont.svg#GriffosFont') format('svg');
}


Maybe you need to add this to your CSS:

* {-webkit-font-smoothing: antialiased;}


font-weight: lighter; was not working for me so I used font-weight: normal; instead, which worked for my purpose. not sure what's going on with chrome right now...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜