-webkit-font-smoothing 属性在 Chrome 中无效 [英] -webkit-font-smoothing property has no effect in Chrome

查看:63
本文介绍了-webkit-font-smoothing 属性在 Chrome 中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 -webkit-font-smoothing CSS 属性来控制 Google Chrome 的(可怕的)字体抗锯齿,但它对文本完全没有影响.

<p style="-webkit-font-smoothing: subpixel-antialiased">这是一个字体测试.</p><p style="-webkit-font-smoothing: antialiased">这是一个字体测试.</p><p style="-webkit-font-smoothing: none">这是一个字体测试.</p>

我在 Photoshop 中比较了像素,这三个像素完全相同.Chrome 不再支持此属性了吗?

解决方案

https://productforums.google.com/forum/?fromgroups=#!topic/chrome/0vqp1bnkaoE

<块引用>

-webkit-font-smoothing 不再有效.Google Chrome 团队有意改变了这种行为.在以前的版本中,似乎没有在 OSX 上正确"应用字体平滑.

I'm trying to control Google Chrome's (horrible) font anti-aliasing using the -webkit-font-smoothing CSS property, but it's having absolutely no effect on the text.

<div style="font-size: 42px">
  <p style="-webkit-font-smoothing: subpixel-antialiased">This is a font test.</p>
  <p style="-webkit-font-smoothing: antialiased">This is a font test.</p>
  <p style="-webkit-font-smoothing: none">This is a font test.</p>
</div>

I've compared the pixels in Photoshop and all three are exactly the same. Is Chrome not supporting this property anymore?

解决方案

https://productforums.google.com/forum/?fromgroups=#!topic/chrome/0vqp1bnkaoE

-webkit-font-smoothing no longer works. Google Chrome team intentionally changed this behavior. Seems font-smoothing wasn't applied "properly" on OSX in previous versions.

这篇关于-webkit-font-smoothing 属性在 Chrome 中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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