aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/animation-duration/index.html
blob: e3dcca408b319ff14c762b897a3cea7092f5a6cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
title: animation-duration
slug: Web/CSS/animation-duration
tags:
  - Animation
  - CSS
  - CSS アニメーション
  - CSS プロパティ
  - Reference
  - animation-duration
translation_of: Web/CSS/animation-duration
---
<div>{{CSSRef}}</div>

<p><strong><code>animation-duration</code></strong><a href="/ja/docs/CSS">CSS</a> のプロパティで、1回のアニメーション周期が完了するまでの所要時間を設定します。</p>

<div>{{EmbedInteractiveExample("pages/css/animation-duration.html")}}</div>

<p class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</p>

<p>アニメーションのプロパティすべてを一度に設定するには、一括指定プロパティである {{cssxref("animation")}} プロパティを使用すると便利です。</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="brush:css no-line-numbers notranslate">/* 単一のアニメーション */
animation-duration: 6s;
animation-duration: 120ms;

/* 複数のアニメーション */
animation-duration: 1.64s, 15.22s;
animation-duration: 10s, 35s, 230ms;
</pre>

<h3 id="Values" name="Values"></h3>

<dl>
 <dt><code>{{cssxref("&lt;time&gt;")}}</code></dt>
 <dd>1回のアニメーションの周期にかかる時間。この値は、秒 (<code>s</code>) またはミリ秒 (<code>ms</code>) で指定することができます。値は正の数か0でなければならず、単位は必須です。 <code>0s</code> の値は、既定値ですが、アニメーションを実行しないことを意味します。</dd>
</dl>

<div class="note">
<p><strong>注:</strong> 負の数は無効であり、宣言が無視されます。一部、初期の接頭辞付きの実装は <code>0s</code> と等価に解釈するかもしれません。</p>
</div>

<div class="note">
<p><strong></strong>: <code>animation-*</code> プロパティにカンマ区切りで複数の値を指定した場合、 {{cssxref("animation-name")}} プロパティで指定したアニメーションに割り当てられますが、いくつあるかによって異なる方法で割り当てられます。詳しくは、<a href="/ja/docs/Web/CSS/CSS_Animations/Using_CSS_animations#Setting_multiple_animation_property_values">複数のアニメーションプロパティ値の設定</a> を参照してください。</p>
</div>

<h2 id="Formal_definition" name="Formal_definition">公式定義</h2>

<p>{{cssinfo}}</p>

<h2 id="Formal_syntax" name="Formal_syntax">形式文法</h2>

{{csssyntax}}

<h2 id="Examples" name="Examples"></h2>

<p><a href="/ja/docs/Web/CSS/CSS_Animations/Using_CSS_animations">CSS アニメーション</a>を参照してください。</p>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Animations', '#animation-duration', 'animation-duration')}}</td>
   <td>{{Spec2('CSS3 Animations')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>

<p>{{Compat("css.properties.animation-duration")}}</p>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li><a href="/ja/docs/Web/CSS/CSS_Animations/Using_CSS_animations" title="Tutorial about CSS animations">CSS アニメーションの使用</a></li>
 <li>JavaScript {{domxref("AnimationEvent")}} API</li>
</ul>