アニメーションの進展を定義。
名前 | animation-timing-function
|
---|---|
値 | <easing-function># |
初期値 | ease |
適用対象 | すべての要素 |
継承 | されない |
百分率 | 受容しない |
算出値 | リスト:各アイテムは 算出された <easing-function> を与える |
正準的順序 | 文法に従う |
アニメーション型 | アニメート不可 |
animation-timing-function プロパティは、計時関数 ― アニメーションが 各 keyframe 間で どう進捗するか ― を記述する。計時関数は、[CSS-EASING-1] にて別に定義される。
入力進捗値には、animation-direction プロパティによる効果を組み入れた上で†、現在の keyframe の所要時間に対する keyframe の開始から経過した時間の割合が利用される。【†すなわち、逆方向に再生されるときは、時計も逆方向に進める下で出力進捗値を生産する。】
animation-delay の間は、animation-timing-function は適用されない。
注記: この定義は必要とされる ― さもなければ、計時関数が階段~easing関数であって、その段位置が start にされている場合、backwards による延伸の間、関数の最初の段の上端側の出力進捗値を生産することになるので。
出力進捗値は、現在の keyframe と次の keyframe の間のプロパティ値を補間するときの p 値として利用される。
keyframe 内†に指定された animation-timing-function は、その keyframe から時系列順で††次の[ animation-timing-function を定義するような keyframe ]、もしくは 100% keyframe(暗黙のそれも含む)までの、アニメーションの進展を定義する。
【† すなわち、<keyframe-block> 内の <declaration-list> 内】【†† すなわち、keyframe 選択子の値の昇順】
以下のCSSが組み込んであります:
linear
<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:3s; "></DIV> </DIV>
ease
<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:ease; animation-duration:3s; "></DIV> </DIV>
ease-in
<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:ease-in; animation-duration:3s; "></DIV> </DIV>
ease-out
<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:ease-out; animation-duration:3s; "></DIV> </DIV>
ease-in-out
<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:ease-in-out; animation-duration:3s; "></DIV> </DIV>
cubic-bezier(<number>[0,1], <number>, <number>[0,1], <number>)
<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:cubic-bezier(0.9, 0.1, 0.1, 0.9); animation-duration:3s; "></DIV> </DIV>
step-start
<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:step-start; animation-duration:3s; "></DIV> </DIV>
step-end
<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:step-end; animation-duration:3s; "></DIV> </DIV>
steps(<integer>[, <step-position> ]?)
省略可能な 2 個目のパラメーターは、次に挙げるいずれかの値を利用して 段位置 を指定する ― それは、入力進捗値[0 の所、1 の所]で“段差”(出力進捗値の変化)が生じるかどうかを定義する。
<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:steps(3); animation-duration:3s; "></DIV> </DIV>
jump-start
<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:steps(3,jump-start); animation-duration:3s; "></DIV> </DIV>
jump-end
<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:steps(3,jump-end); animation-duration:3s; "></DIV> </DIV>
jump-none
<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:steps(3,jump-none); animation-duration:3s; "></DIV> </DIV>
jump-both
<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:steps(3,jump-both); animation-duration:3s; "></DIV> </DIV>
start
<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:steps(3,start); animation-duration:3s; "></DIV> </DIV>
end
<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:steps(3,end); animation-duration:3s; "></DIV> </DIV>
表示内容: |
表示内容: |