1
我可以animateTransform raplace設置嗎?SVG SMIL:animateTransform取代設置(不透明度和比例屬性)
<animateTransform attributeName="transform" attributeType="XML" type="scale" from="1" to="1.15" repeatCount="1" begin="mousedown+0.2s" dur="0.2s" fill="freeze"></animateTransform>
<animateTransform attributeName="transform" attributeType="XML" type="scale" from="1.15" to="1" repeatCount="1" begin="mouseup+0.4s" dur="0.2s" fill="freeze"></animateTransform>
操縱的變換(規模),就像我與我的 '中風不透明度' 沒有把它歸功於此:
<rect x="-0.5" y="-0.5" width="1" height="1" fill="white">
<set attributeName="stroke-opacity" begin="mouseover" end="mouseout" to="0.5"></set>
<set attributeName="stroke-opacity" begin="mouseout" end="mouseover" to="1"></set>
</rect>
我試圖讓這樣的事情
<rect x="-0.5" y="-0.5" width="1" height="1" fill="white">
<set attributeName="transform" type="scale" begin="mousedown" end="mouseout" to="1.15"></set>
<set attributeName="transform" type="scale" begin="mouseup" end="mouseover" to="1"></set>
</rect>
但是這種結構不起作用。
它的工作原理:懸停
例子(使用設置):點擊(使用animateTransform)的http://jsfiddle.net/exn2qr0s/
它不工作:
點擊示例(使用設置): http://jsfiddle.net/exn2qr0s/2/
我需要使用一套代碼,而不animateTransform用於創建放大效應,當現在「鼠標按下」事業animateTransform去年火狐更新(Deprecated SMIL SVG animation replaced with CSS or Web animations effects (hover, click))