font-weight:900只能在Firefox中使用 [英] font-weight:900 only working in Firefox

查看:77
本文介绍了font-weight:900只能在Firefox中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.bold{
font: 900 20px helvetica;
}

.bolder{
font: 700 20px helvetica;
}

除了Mozilla Firefox,

I am getting same result for two class except Mozilla Firefox.

任何人都可以告诉我如何在所有浏览器(Firefox,Chrome,IE,safari,opera)中获得相同的结果

Can anyone tell me how can I get same result in all browser (Firefox,Chrome,IE,safari,opera)

推荐答案

这取决于字体。重量必须在显示的字体内可用,或者浏览器将选择最接近的可用重量。

It depends on the font. The weight has to be available within the font displayed, or the browser will pick the closest available weight.

Helvetica不能在字体文件中嵌入所有这些重量。

Helvetica must not have all of those weights embedded within the font file.

前往这里阅读: https://developer.mozilla.org/en/CSS/font-weight

它说:


100,200,300,400,500,600,700,800,900

提供超出正常和粗体的字体的数字字体权重。如果给定的确切重量不可用,则600-900使用最接近的可用较暗重量(或者如果没有,则是最接近的可用较轻重量),并且100-500使用最接近的可用较轻重量(或者,如果没有,最接近的可用较暗重量)。这意味着对于只提供正常和粗体的字体,100-500是正常的,而600-900是粗体。

Numeric font weights for fonts that provide more than just normal and bold. If the exact weight given is unavailable, then 600-900 use the closest available darker weight (or, if there is none, the closest available lighter weight), and 100-500 use the closest available lighter weight (or, if there is none, the closest available darker weight). This means that for fonts that provide only normal and bold, 100-500 are normal, and 600-900 are bold.

不同的浏览器在权重不可用时如何处理字体权重有不同的规则。

Perhaps the different browsers have different rules about how to treat font weights when the weight is unavailable.

这篇关于font-weight:900只能在Firefox中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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