CSS 使用变换:缩放会导致图像模糊
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27060690/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Using transform: scale results in blurry images
提问by grindking
In our catalog view (online store) we use javascript to get different views of the products and scale the images down with CSS. 3 in a row / 4 or 5/
在我们的目录视图(在线商店)中,我们使用 javascript 来获取产品的不同视图,并使用 CSS 缩小图像。连续 3 个 / 4 个或 5 个 /
The default view is 4:
默认视图为 4:
-webkit-transform: scale(0.83);
-moz-transform: scale(0.83);
-ms-transform: scale(0.83);
-o-transform: scale(0.83);
transform: scale(0.83);
Everything works but the images look very blurry in safari. Is there a way to improve the rendering for safari? Bigger Image: http://i.stack.imgur.com/NaFeB.jpg
一切正常,但图像在 safari 中看起来非常模糊。有没有办法改进 safari 的渲染?大图:http: //i.stack.imgur.com/NaFeB.jpg
回答by spinsch
it works if you reset the blur filter in safari:
如果您在 safari 中重置模糊过滤器,它会起作用:
-webkit-filter: blur(0px);
example for all browsers:
所有浏览器的示例:
filter: none;
-webkit-filter: blur(0px);
-moz-filter: blur(0px);
-ms-filter: blur(0px);
filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='0');
hope it helps
希望能帮助到你