animation-timing-function プロパティ
animation-timing-function プロパティは、CSS アニメーションの実行速度曲線を定義するプロパティです。
steps(int,start|end)の第1引数は0以上で、第2引数を定義しない場合はendがデフォルトで設定されます。
div:hover{
animation: mymove 1s forwards;
animation-timing-function: steps(5,start);
}
@keyframes mymove {
from {
}
to {
box-shadow: 10px 10px;
}
}
ページ内 Index
構文(Syntax)
CSS
animation-timing-function:[ ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(int,start|end) | cubic-bezier(n,n,n,n) | initial | inherit ];
DOM ( JavaScript )
object.style.animationTimingFunction
object.style.animationTimingFunction="[ ease | linear | ease-in | ease-out | cubic-bezier(n, n, n, n) | initial | inherit ]"
値(Values)
| Value | 摘要 |
|---|---|
| ease | 初期値(default値)で最初ゆっくり、途中が速く、最後がゆっくり |
| linear | 同じペース |
| ease-in | ゆっくり始まる |
| ease-out | ゆっくり終わる |
| ease-in-out | ゆっくり始まり、ゆっくり終わる |
| step-start | steps(1, start)と同じ |
| step-end | steps(1, end)と同じ |
| steps(int,start|end) | 実行ペースを設定、第1引数はステップ数、第2引数はステップの発生するタイミング |
| cubic-bezier(n, n, n, n) | 3次ベジェ関数で定義、値は0〜1の数値 |
| initial | 初期値に戻す |
| inherit | 親エレメントのプロパティを継承 |
備考(Remarks)
| 初期値(Default value) | ease |
| 継承(Inherited) | no |
| 変化(Animatable) | no |
Example
関連 CSS プロパティ
| プロパティ | 概要 |
|---|---|
| animation | CSSアニメーションのプロパティを一括指定 |
| animation-delay | 実行までの待ち時間。 |
| animation-direction | 再生/逆再生の設定。 |
| animation-duration | CSS animationの実行時間。 |
| animation-fill-mode | 実行時間外の動作。 |
| animation-iteration-count | 再生回数。 |
| animation-name | @keyframesセレクターで定義したCSS animation名。 |
| animation-play-state | 実行/停止かの設定。 |
| animation-timing-function | 実行速度曲線を定義 |
