【发布时间】:2015-08-08 00:02:43
【问题描述】:
我正在尝试使用 SVF 滤镜在图像上制作悬停效果。我的问题是我不知道如何使效果持久。我可以提供 1 秒的持续时间,但我无法按我的意愿保留 feColorMatrix 的 values。
<filter id="blurred" color-interpolation-filters="sRGB" x="0%" y="0%" height="10%" width="10%">
<feColorMatrix result="wispy" type="matrix" values="8 0 0 0 -1 4 0 4 3 -1 4 0 0 0 -1 1 0 0 0 0">
<animate
attributeType="XML"
id="blurredAnimation"
attributeName="values"
from="8 0 0 0 -1 4 0 4 3 -1 4 0 0 0 -1 1 0 0 0 0"
to="3 0 0 0 -1 4 0 4 3 -1 4 0 0 0 -1 1 0 0 0 0"
dur="1s"
values = "8 0 0 0 -1 4 0 4 3 -1 4 0 0 0 -1 1 0 0 0 0;3 0 0 0 -1 4 0 4 3 -1 4 0 0 0 -1 1 0 0 0 0;"
keyTimes = "0;1"
begin="indefinite" />
</feColorMatrix>
</filter>
只要悬停在那里,我希望绿色效果保持在那里。
谢谢
这里是jsFiddle
【问题讨论】:
标签: svg svg-filters