アニメーションの再生方法。
名前 | animation-direction
|
---|---|
値 | <single-animation-direction># |
初期値 | normal |
適用対象 | すべての要素 |
継承 | されない |
百分率 | 受容しない |
算出値 | リスト: 各アイテムは 指定されたキーワードを与える |
正準的順序 | 文法に従う |
アニメーション型 | アニメート不可 |
animation-direction プロパティは、アニメーションを どの周回において逆再生させるか を定義する。アニメーションが逆再生されるときは計時関数も逆にされる。例えば、逆再生されたときの ease-in アニメーション【 animation-timing-function の値が ease-in にされたアニメーション】は、ease-out アニメーションとして現れることになる。
以下のCSSが組み込んであります:
normal
<DIV style="border:1px solid black; width:200px; height:50px; "> <DIV style="position:relative; width:25px; height:25px; background:red; left:0px; top:0px; animation-name:Test; animation-timing-function:linear; animation-duration:5s; animation-direction:normal; "></DIV> </DIV>
reverse
<DIV style="border:1px solid black; width:200px; height:50px; "> <DIV style="position:relative; width:25px; height:25px; background:red; left:0px; top:0px; animation-name:Test; animation-timing-function:linear; animation-duration:5s; animation-direction:reverse; "></DIV> </DIV>
alternate
<DIV style="border:1px solid black; width:200px; height:50px; "> <DIV style="position:relative; width:25px; height:25px; background:red; left:0px; top:0px; animation-name:Test; animation-timing-function:linear; animation-duration:5s; animation-direction:alternate; "></DIV> </DIV>
<DIV style="border:1px solid black; width:200px; height:50px; "> <DIV style="position:relative; width:25px; height:25px; background:red; left:0px; top:0px; animation-name:Test; animation-timing-function:linear; animation-duration:5s; animation-direction:alternate; animation-iteration-count:2; "></DIV> </DIV>
alternate-reverse
<DIV style="border:1px solid black; width:200px; height:50px; "> <DIV style="position:relative; width:25px; height:25px; background:red; left:0px; top:0px; animation-name:Test; animation-timing-function:linear; animation-duration:5s; animation-direction:alternate-reverse; animation-iteration-count:2; "></DIV> </DIV>
注記: 反復の偶奇を決定する目的においては、回数は 1 から数えることに注意。
表示内容: |
表示内容: |