Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.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
Jquery 如何设置svg过滤器feComponentTransfer的动画?_Jquery_Html_Css_Svg - Fatal编程技术网

Jquery 如何设置svg过滤器feComponentTransfer的动画?

Jquery 如何设置svg过滤器feComponentTransfer的动画?,jquery,html,css,svg,Jquery,Html,Css,Svg,有人知道如何在feComponentTransfer中使用feFuncRGB中的animate标记吗?我有一个SVG过滤器,我需要通过一些转换在单击时显示/隐藏它 诸如此类: <svg xmlns="http://www.w3.org/2000/svg" id="svg-filters"> <filter id="duotone"> <feComponentTransfer color-interpolation-filters="sRGB"

有人知道如何在feComponentTransfer中使用feFuncRGB中的animate标记吗?我有一个SVG过滤器,我需要通过一些转换在单击时显示/隐藏它

诸如此类:

<svg xmlns="http://www.w3.org/2000/svg" id="svg-filters">
    <filter id="duotone">
        <feComponentTransfer color-interpolation-filters="sRGB" result="duotone_cyan_blue">
            <feFuncR type="table" tableValues="0.2489 0.9589">
                <animate 
                id="animate"
                attributeName="tableValues" 
                dur="2s" 
                from="0 1" 
                to="0.2489 0.9589" 
                fill="freeze" 
                />
            </feFuncR>
        </feComponentTransfer>
    </filter>
</svg>

谢谢

一种解决方案是使用svg图像,如下所示:

svg.addEventListener(“单击”,()=>{
_设置.beginElement()的动画;
})

$('img').click( function() {
  $("#animate").beginElement();
});