Jquery 如何设置svg过滤器feComponentTransfer的动画?
有人知道如何在feComponentTransfer中使用feFuncRGB中的animate标记吗?我有一个SVG过滤器,我需要通过一些转换在单击时显示/隐藏它 诸如此类: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"
<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();
});