30

私は次のシーケンスを持っていますanimationTransform

<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="30" begin="0s" dur="0.4s" fill="freeze"/>
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="30" to="0" begin="0.4s" dur="0.4s" fill="freeze"/>

スクリプトを使用せずにこのシーケンスをループすることが可能であれば?

repeatCount="indefinite"シーケンス全体を順番にループしたいので、を使って個々のアニメーションをループするように設定できます。

4

3 に答える 3

40

すでにそれを理解しました。興味のある方への解決策:

<animateTransform id="anim1" attributeName="transform" attributeType="XML" type="rotate" from="0" to="30" begin="0s; anim2.end" dur="0.4s" fill="freeze"/>
<animateTransform id="anim2" attributeName="transform" attributeType="XML" type="rotate" from="30" to="0" begin="anim1.end" dur="0.4s" fill="freeze"/>
于 2010-09-02T19:05:54.593 に答える
35

セミコロンで区切られたリストをanimateTransform持つ属性を提供することで、単一の中でループすることもできます:values

<animateTransform attributeName="transform" type="rotate"
     values="0;30;0" begin="0s" dur="0.8s" fill="freeze"
     repeatCount="indefinite" />

例を次に示します (Firefox 4.0 と Chrome で確認)。

于 2010-12-22T11:43:46.093 に答える
8

(ミリ) 秒を加算/減算することもできます。

  begin="anim2.end-500ms"
于 2011-11-01T10:25:20.197 に答える