Firefox上的SVG图像遮罩 [英] SVG Image Masking on Firefox

查看:72
本文介绍了Firefox上的SVG图像遮罩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我创建了六边形SVG,并计划将其实现为firefox的图像遮罩. 目前仅适用于Chrome

recently I create hexagon SVG, and I plan to implement it for image masking for firefox. currently its only working for Chrome

http://jsfiddle.net/brokeneye/WKEbw/

我已经尝试使用mask: url,但似乎不起作用.

I already try to use mask: url but it seems doesn't work.

已解决

为此找到了解决方案,它可以在Firefox,Chrome,Safari,Opera和IE9上运行.需要在SVG上定义img.示例代码在下面的小提琴中

Found the solution for this, its working on Firefox, chrome, safari, opera and IE9. Need to define the img on the SVG. the sample code is on this fiddle below

http://jsfiddle.net/brokeneye/ygsKm/

推荐答案

Firefox支持以其他方式进行的操作.您可以使用带有html图像的SVG蒙版用不同的语法在那里获得相同的效果.

Firefox supports what you want to do in a different way. You can use SVG masks with html images to get the same effect there with a different syntax.

这篇关于Firefox上的SVG图像遮罩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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