使Firefox图像缩小比例类似于Chrome或IE中的结果 [英] Make Firefox image scaling down similar to the results in Chrome or IE
问题描述
左侧是原始PNG,右侧是使用 width
和 height
减小到原始大小的一半的版本.
On the left is the original PNG and on the right are versions reduced to roughly half the original size using width
and height
.
为什么在Firefox中调整大小的图像看起来如此模糊?在不更改图像文件的情况下,我能做些什么?如果图像包含大量数学或文本,则模糊性尤其令人讨厌.
Why does the resized image look so fuzzy in Firefox? Is there anything I can do about it without changing the image file? The fuzziness is particular annoying if the image contains large amounts of math or text.
推荐答案
有一个Bugzilla中提交的长期臭虫票证,与Firefox图像缩小有关.您可能希望随时关注票证,以跟踪票证的最终解决方案,或者在可能的情况下自行提供补丁.
There is a longstanding bug ticket filed in Bugzilla related to Firefox image downscaling. You might like to keep an eye on the ticket to track its eventual resolution or contribute a patch yourself if you feel able to.
最好的解决方法是使用 transform
CSS属性将微小的旋转应用于问题图像并强制进行亚像素渲染,如
The best workaround is to use the transform
CSS property to apply a tiny rotation to the problem image and force sub-pixel rendering, as detailed in Ryan Wheale's answer.
这篇关于使Firefox图像缩小比例类似于Chrome或IE中的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!