CSSアニメーションプロパティ
例
省略形のプロパティを使用して、アニメーションを<div>要素にバインドします。
div
{
animation: mymove 5s infinite;
}
定義と使用法
プロパティは、次のanimation
略記プロパティです。
- アニメーション名
- アニメーション-期間
- アニメーションタイミング機能
- アニメーション-遅延
- アニメーション-反復-カウント
- アニメーション方向
- アニメーション-塗りつぶしモード
- アニメーション再生状態
注:必ずanimation-durationプロパティを指定してください。指定しない場合、durationは0になり、再生されません。
デフォルト値: | なし0イーズ01通常なし実行中 |
---|---|
遺伝性の: | いいえ |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | object .style.animation = "mymove 5s infinite" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後に-webkit-、-moz-、または-o-が続く場合は、プレフィックスを使用して機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
animation | 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: name duration timing-function delay iteration-count
direction fill-mode play-state;
プロパティ値
Value | Description |
---|---|
animation-name | Specifies the name of the keyframe you want to bind to the selector |
animation-duration | Specifies how many seconds or milliseconds an animation takes to complete |
animation-timing-function | Specifies the speed curve of the animation |
animation-delay | Specifies a delay before the animation will start |
animation-iteration-count | Specifies how many times an animation should be played |
animation-direction | Specifies whether or not the animation should play in reverse on alternate cycles |
animation-fill-mode | Specifies what values are applied by the animation outside the time it is executing |
animation-play-state | Specifies whether the animation is running or paused |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSアニメーション
HTML DOMリファレンス:アニメーションプロパティ