我使用带有 font-face 的自定义字体,它在除 Windows 上的 Firefox 之外的所有浏览器中都运行良好。字体的颜色应该是灰色#666。但它看起来是粉红色的!知道如何在 win 机器上避免 FF 中这些难看的颜色吗?
最佳答案
编辑: 评论表明这是字体问题而不是颜色问题,仔细查看示例后我同意。这是极端 Cleartype 平滑的示例 - 绿色不受影响,而红色和蓝色已被弱化以使线条显得更细。由于背景是白色,这种弱化使红色和蓝色变浅,从而产生粉红色/洋红色调。
Cleartype 背后的理论是,这些操作应该几乎是不可见的,看看你未缩放的例子,我会说色调非常微妙。只有当你把它炸毁时,它才会变得明显,至少在我的显示器上是这样。
可能有一种方法可以在您自己的系统上调整 Cleartype,但这在整个网络上都行不通。唯一的解决办法是更改字体本身的提示,这样它就不会尝试制作如此细的垂直线。
尝试使用颜色 #666666
而不是 #666
。
来自 Wikipedia :
An abbreviated, three (hexadecimal) digit form is sometimes used. Expanding this form to the six-digit form is as simple as doubling each digit: 09C becomes 0099CC. This allows each color value to cover its full range from 00 to FF. The three-digit form is described in the CSS specification, not in HTML. As a result, the three digit form in an attribute other than "style" is not interpreted as a valid color in some browsers.
关于css - Font-Face Firefox 5/7 — 仅限 Windows — 难看的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7732662/