Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 用于IE中图像掩蔽的SVG_Html_Css_Internet Explorer_Svg_Mask - Fatal编程技术网

Html 用于IE中图像掩蔽的SVG

Html 用于IE中图像掩蔽的SVG,html,css,internet-explorer,svg,mask,Html,Css,Internet Explorer,Svg,Mask,我在这里使用IE10,firefox工作正常,但IE中没有显示掩码 <svg style="height:0;"> <mask id="m1" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse"> <image width="78px" hei

我在这里使用IE10,firefox工作正常,但IE中没有显示掩码

<svg style="height:0;">
                                      <mask id="m1" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse">
                                        <image width="78px" height="78px" xlink:href="images/mask2.png"></image>
                                      </mask>
                                    </svg>
                                    <img src="images/avatar-sample.jpg" style="mask:url(#m1);"/>

目前只有Firefox支持。其他UAs仅允许您设置SVG效果,例如SVG对象上的掩码


如果你想在IE中实现这一点,你必须使用SVG
元素来显示图像,而不是HTML
元素。

可能的副本非常相似,但其中一个掩码应用于外来对象,另一个应用于HTML img元素。前者应该在IE中工作,但不能在后者中工作。也不能在IE中工作。前者使用foreignObject在IEso中显示完全空白的页面。有人对如何在FF和IE中工作有任何意见吗?这是你的另一个问题。我已经回答了这个问题。