使用css强制抗锯齿:这是一个神话吗? [英] Forcing anti-aliasing using css: Is this a myth?
问题描述
最近,一个客户抱怨在IE6系统字体的外观。基本上第三个问题是IE6不支持字体平滑/反锯齿(我知道你可以在操作系统设置或某事开启它)。但是有人抛出了这个gem:
你可以通过使用pt而不是px在css中强制使用字体反别名。
我在各种浏览器中做了一个快速的POC,看到没有什么区别。我在网上找到了一个引用,最后发布在此论坛上:
http://www.webmasterworld.com/css/3280638.htm
这听起来像是一个web开发人员城市神话,我的感觉是它的BS。有没有人遇到过?
不,没有真正的方法来控制这个web开发人员。
小的例外是,你可以通过使用Flash通过 sIFR ,有些浏览器不会对位图/像素字体进行反锯齿(因为它们不应该更多信息:抗锯齿 / 抗抗锯齿)。
此外,像Daniel所说的,对于所有字体使用 em
,请参阅 The Incredible Em&有关此的详细信息,请参见CSS弹性布局。
Recently a client has complained about the appearance of a system font in IE6. Basically th issue is that IE6 doesn't support font-smoothing/anti-aliasing (I know you can turn it on in an OS setting or something). But someone threw out this gem:
"You can force font anti-alias in css by using pt instead of px."
I did a quick POC in various browsers and saw no difference. I found one reference to it online, last post on this forum:
http://www.webmasterworld.com/css/3280638.htm
This sounds like the equivalent of a web developer urban myth, my feeling is it's BS. Has anyone ever encountered it?
No, there's not really any way to control this as a web developer.
Small exceptions are that you can do some fake forcing of anti-aliasing by using Flash through sIFR, and some browsers won't anti-alias bitmap/pixel fonts (as they shouldn't, more info: Anti-Aliasing / Anti-Anti-Aliasing).
Also, as Daniel mentioned, it's ideal to be using em
units for all fonts, see The Incredible Em & Elastic Layouts with CSS for more information about this.
这篇关于使用css强制抗锯齿:这是一个神话吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!