CSS3 animation-direction プロパティ

❮ 前章へ 完全な CSS リファレンス 次へ ❯

一旦アニメーションを再生した後、逆再生します:

div {
    -webkit-animation-direction: alternate; /* Chrome, Safari, Opera */
    animation-direction: alternate;
}
Try it Yourself ❯

定義と用法

animation-direction プロパティは、アニメーションを交互に反転再生させるかどうかを定義します。

デフォルト値: normal
継承: 継承する
アニメーション可否: 不可。animatable を参照
バージョン: CSS3
JavaScript 構文: object.style.animationDirection="reverse" Try it

ブラウザ・サポート

表中の数字は、完全にプロパティをサポートした最初のブラウザのバージョンです。

-webkit-、-moz-、-o- の後に続く数字は、接頭辞付きで動作した最初のバージョンです。

プロパティ
animation-direction 43.0
4.0 -webkit-
10.0 16.0
5.0 -moz-
9.0
4.0 -webkit-
30.0
15.0 -webkit-
12.0 -o-

CSS 構文

animation-direction: normal|reverse|alternate|alternate-reverse|initial|inherit;

プロパティの値

説明 Play it
normal デフォルト値。アニメーションを通常方向に再生します Play it ❯
reverse アニメーションを逆方向に再生します Play it ❯
alternate アニメーションを、奇数番目(1,3,5,etc..)では通常方向に再生し、偶数番目(2,4,6,etc...)では逆方向に再生します Play it ❯
alternate-reverse アニメーションを、奇数番目(1,3,5,etc..)では逆方向に再生し、偶数番目(2,4,6,etc...)では通常方向に再生します Play it ❯
initial プロパティにデフォルト値を設定します。initial を参照
inherit このプロパティは親要素を継承します。inherit を参照

注: "reverse" と "alternate-reverse" は、Safari ではサポートしていません。.


関連ページ

CSS3 チュートリアル:CSS3 Animations

HTML DOM リファレンス:animationDirection プロパティ


❮ 前章へ 完全な CSS リファレンス 次へ ❯