SVG:“阴影"滤镜在移动Safari上对SVG进行像素化 [英] SVG: Drop-Shadow filter pixelates SVG on mobile Safari

查看:116
本文介绍了SVG:“阴影"滤镜在移动Safari上对SVG进行像素化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用img标记嵌入的SVG文件中使用投影滤镜.在我的MacBook上,在Safari中看起来还不错.但是,在移动Safari中,图形确实变得像素化,失去了清晰度.如果不应用滤镜,则SVG效果很好.除了通过过滤器之外,还有什么方法可以解决此问题?

I am using a drop shadow filter inside an SVG file that is embedded using an img tag. On my MacBook, it looks fine in Safari. However, in mobile Safari, the graphic gets really pixelated and loses all it's sharpness. When the filter is not applied, the SVG renders fine. Is there any way to fix that besides to pass on the filter?

推荐答案

您应尝试明确设置"filterRes" 属性为与视网膜显示匹配的值.

You should try explicitly setting the "filterRes" attribute of the filter to a value that matches retina displays.

这篇关于SVG:“阴影"滤镜在移动Safari上对SVG进行像素化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆