为什么CSS落下滤波器在铬上扭曲而不是Firefox?

问题描述 投票:0回答:1


img { filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px 1px 0 black) drop-shadow(1px -1px 0 black) drop-shadow(-1px -1px 0 black); }

<img src="https://sen.fish/images/navigation/statue2/frame_00_delay-0.1s.gif">


这种工作正如我在Firefox/Gecko上所期望的那样:

但在铬浏览器上,这是我得到的结果:A statue with a transparent background and a thin black border

有一种方法可以防止过滤器在铬浏览器上被抵消吗?它们是为什么它们呈现不同的原因吗? (即,这是一个错误吧?)A statue with a transparent background and an offset thin black border

当起草这个问题时,我在Codepen上玩了一下,并通过使用两个单独的过滤器找到了该解决方案来修复铬浏览器的渲染:

css google-chrome firefox svg-filters
1个回答
0
投票
Firefox:

chrome:

A statue with a transparent background and a thin black border

novey,我仍然不明白为什么在显而易见的情况下会发生这种渲染差异 - 它们以不同的方式实现了SVG。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.