Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 我如何获得';字体重量:较轻';在谷歌浏览器上工作?_Css_Fonts_Cross Browser - Fatal编程技术网

Css 我如何获得';字体重量:较轻';在谷歌浏览器上工作?

Css 我如何获得';字体重量:较轻';在谷歌浏览器上工作?,css,fonts,cross-browser,Css,Fonts,Cross Browser,Google Chrome(可能还有Safari)中的“字体重量:正常”和“字体重量:粗体”似乎没有任何区别。有没有人能像Firefox那样在Chrome中调用“font-weight:think”呢?这似乎是Chrome最新开发版本中修复的一个问题: 您还可以尝试以下方法: 要在未定义粗体字体的@font-face字体上启用font-weight属性,需要显式定义字体重量:正常和字体样式:正常在@font-face定义中。例如: @font-face{ 字体系列:“GriffosFont常规字

Google Chrome(可能还有Safari)中的“字体重量:正常”和“字体重量:粗体”似乎没有任何区别。有没有人能像Firefox那样在Chrome中调用“font-weight:think”呢?

这似乎是Chrome最新开发版本中修复的一个问题:

您还可以尝试以下方法:

要在未定义粗体字体的
@font-face
字体上启用
font-weight
属性,需要显式定义
字体重量:正常
字体样式:正常
@font-face
定义中。例如:

@font-face{
字体系列:“GriffosFont常规字体”;
字体大小:正常;
字体风格:普通;
src:url('font/grifsfont.eot');
src:local('grifsfont Regular')、local('grifsfont')、url('font/grifsfont.woff')格式('woff')、url('font/grifsfont')\
ttf')格式('truetype')、url('fonts/GriffosFont.svg#GriffosFont')格式('svg');
}

字体重量:更轻
不适合我,所以我使用了
字体重量:正常相反,这符合我的目的。不确定chrome现在是怎么回事…

也许您需要将此添加到CSS中:

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

请注意,
font-weight:lighter
使“一步”字体更轻,因此继承粗体的元素将改为使用普通字体权重呈现。如果您心里有一个特定的字体大小,最好直接指定它<代码>字体大小:200
将产生一个较轻的字体。我同意。无论如何,在写这篇文章时,
font-weight:lighter在chrome中不起作用。我可以通过我的承诺来找到有这个bug的chrome的确切版本,我确信它已经被修复了(五年后)。