如何在Google Chrome中使用“font-weight:lighter”工作? [英] How Do I get 'font-weight: lighter' to work in Google Chrome?

查看:84
本文介绍了如何在Google Chrome中使用“font-weight:lighter”工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Chrome(可能是Safari)的font-weight:normal和font-weight:bold之间似乎没有任何区别。有没有人找到一种方法来调用chrome的'font-weight:thinner'这种方式,Firefox的方式?

There doesn't appear to 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?

推荐答案

成为已知问题 Chrome固定在最新开发版本中:

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

有一个 temporary temporaryaround 您还可以尝试:


启用 c font-face 字体的$ c> font-weight 属性,不需要定义一个粗体字体,您需要明确定义 font-style:normal; strong>在 @ font-face 定义中。示例:

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');
}

这篇关于如何在Google Chrome中使用“font-weight:lighter”工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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