使用position:fixed时iPad上的抗锯齿效果更好,为什么?
我注意到,在元素上使用 position:fixed
时,iPad (iOS 5.0.1) 上的文本渲染效果比没有 position:fixed
时更好。对于深色背景上的白色文本尤其如此。
我的问题是如何利用这种改进的抗锯齿功能,而不使用诸如 position:fixed
之类的解决方法。
您可以在下面找到示例图片和相应的代码。
I noticed that when using position: fixed
on an element, the text on the iPad (iOS 5.0.1) is being rendered better than without position: fixed
. This is especially the case for white text on darker background.
My question is how to make use of this improved anti-aliasing without using workarounds such as position: fixed
.
Below you can find an example picture and the corresponding code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道为什么会这样,但我确实知道如何控制 webkit 浏览器中的抗锯齿:
这有帮助吗?
I don't know why that is, but I do know how to control anti aliasing in webkit browsers:
Will this help?
更新到 iOS 5 后,我无法再重现这个问题 - 很奇怪。
After updating to iOS 5 I wasn't able to reproduce this anymore - weird.
在 iPad 上,将
position:fixed
应用于 body 标记会使所有子元素的字体变细(外观类似于-webkit-font-smoothing: antialiased
)。我还没有进行详尽的测试,但它可以在 iOS 5.1.1 中与 Helvetica Neue 配合使用On the iPad, applying
position:fixed
to the body tag makes the font thinner for all child elements (appearance similar to-webkit-font-smoothing: antialiased
). I haven't tested exhaustively, but it works with Helvetica Neue in iOS 5.1.1