aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/document/animationstart_event/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/document/animationstart_event/index.html')
-rw-r--r--files/ja/web/api/document/animationstart_event/index.html95
1 files changed, 95 insertions, 0 deletions
diff --git a/files/ja/web/api/document/animationstart_event/index.html b/files/ja/web/api/document/animationstart_event/index.html
new file mode 100644
index 0000000000..0c9136b56e
--- /dev/null
+++ b/files/ja/web/api/document/animationstart_event/index.html
@@ -0,0 +1,95 @@
+---
+title: 'Document: animationstart イベント'
+slug: Web/API/Document/animationstart_event
+tags:
+ - CSS Animations
+ - CSS アニメーション
+ - Document
+ - Event
+ - Reference
+ - Web
+ - animationstart
+ - イベント
+ - ウェブ
+translation_of: Web/API/Document/animationstart_event
+---
+<div>{{APIRef}}</div>
+
+<p><strong><code>animationstart</code></strong> イベントは、 <a href="/ja/docs/Web/CSS/CSS_Animations">CSS アニメーション</a>が開始したときに発生します。 {{cssxref("animation-delay")}} がある場合、このイベントは待ち時間が経過したときに一度発生します。待ち時間が負の数の場合、イベントは {{domxref("AnimationEvent/elapsedTime", "elapsedTime")}} が待ち時間の絶対値と等しくなったときに発生します (および、関連して、アニメーションはシーケンスの中でそのタイムインデックスに再生が始まります)。</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th>バブリング</th>
+ <td>あり</td>
+ </tr>
+ <tr>
+ <th>キャンセル</th>
+ <td>不可</td>
+ </tr>
+ <tr>
+ <th>インターフェイス</th>
+ <td>{{domxref("AnimationEvent")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">イベントハンドラープロパティ</th>
+ <td>{{domxref("GlobalEventHandlers/onanimationstart","onanimationstart")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>このイベントの本来の対象は、トランジションが適用された {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントについて完全な詳細は、 <a href="/ja/docs/Web/API/HTMLElement/animationstart_event">HTMLElement: animationstart イベント</a>を参照してください。</p>
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<p>このコードは <code>animationstart</code> イベントを待ち受けし、イベント発生時にメッセージを記録します。</p>
+
+<pre class="brush: js">document.addEventListener('animationstart', () =&gt; {
+  console.log('Animation started');
+});
+</pre>
+
+<p>同様に、 <code>onanimationstart</code> を使用するとこうなります。</p>
+
+<pre class="brush: js">document.onanimationstart = () =&gt; {
+  console.log('Animation started');
+};
+</pre>
+
+<p id="Live_example"><a href="/ja/docs/Web/API/HTMLElement/animationstart_event#Live_example">このイベントのライブデモを参照してください。</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", "#eventdef-animationevent-animationstart")}}</td>
+ <td>{{Spec2("CSS3 Animations")}}</td>
+ <td>初回定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
+
+<p>{{Compat("api.Document.animationstart_event")}}</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li><a href="/ja/docs/Web/CSS/CSS_Animations">CSS アニメーション</a></li>
+ <li><a href="/ja/docs/Web/CSS/CSS_Animations/Using_CSS_animations">CSS アニメーションの使用</a></li>
+ <li>{{domxref("AnimationEvent")}}</li>
+ <li>関連イベント: {{domxref("Document/animationend_event", "animationend")}}, {{domxref("Document/animationiteration_event", "animationiteration")}}, {{domxref("Document/animationcancel_event", "animationcancel")}}</li>
+ <li>{{domxref("Window")}} を対象としたこのイベント: {{domxref("Window/animationstart_event", "animationstart")}}</li>
+ <li>{{domxref("HTMLElement")}} を対象としたこのイベント: {{domxref("HTMLElement/animationstart_event", "animationstart")}}</li>
+</ul>