Firefox不支持..png作为位移映射输入吗?这在其他浏览器中是可行的,我不知道我做错了什么。
<svg x="0px" y="0px" width="810px" height="600px" viewBox="0 0 810 600">
<defs>
<filter id="pixelate" x="0%" y="0%" width="100%" height="100%" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feImage x="0" y="0" width="15" height="15" xlink:href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/32648/pixelate-map-5.png" result="dis-map"/>
<feTile in="dis-map" result="pixelate-map" />
<feDisplacementMap in="SourceGraphic" in2="pixelate-map" xChannelSelector="R" yChannelSelector="G" scale="40" result="pre-final"/>
</filter>
</defs>
<image filter="url(#pixelate)" width="810" height="600" preserveAspectRatio="xMidYMid meet" xlink:href="http://uploads2.wikiart.org/images/vincent-van-gogh/the-starry-night-1889(1).jpg"/>
</svg>
发布于 2015-10-17 04:51:52
Firefox实现了过滤器效果规范的安全特性。
您的feImage指向跨域的东西,这会污染过滤器。如果您将feDisplacementMap过滤器应用于受污染的输出,那么它将充当一个通过过滤器的角色,这正是您在这里看到的。
如果我复制过滤器位图,所以它是本地的我的PC,然后过滤器工作的预期。
https://stackoverflow.com/questions/33181027
复制相似问题