From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/htmlelement/transitionend_event/index.html | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 files/ja/web/api/htmlelement/transitionend_event/index.html (limited to 'files/ja/web/api/htmlelement/transitionend_event') diff --git a/files/ja/web/api/htmlelement/transitionend_event/index.html b/files/ja/web/api/htmlelement/transitionend_event/index.html new file mode 100644 index 0000000000..f83e0644b6 --- /dev/null +++ b/files/ja/web/api/htmlelement/transitionend_event/index.html @@ -0,0 +1,95 @@ +--- +title: 'HTMLElement: transitionend イベント' +slug: Web/API/HTMLElement/transitionend_event +tags: + - CSS Transitions + - CSS トランジション + - DOM + - Event + - Reference + - TransitionEvent + - Web + - events + - transitionend + - イベント + - ウェブ +translation_of: Web/API/HTMLElement/transitionend_event +--- +
{{APIRef}}
+ +

transitionend イベントは、 CSS トランジションが完了したときに発生します。トランジションが完了前に削除された場合、例えば {{cssxref("transition-property")}} が削除されたり {{cssxref("display")}} が none に設定されたりした場合、このイベントは生成されません。

+ + + + + + + + + + + + + + + + + + + + +
バブリングあり
キャンセル可能はい
インターフェイス{{domxref("TransitionEvent")}}
イベントハンドラープロパティ{{domxref("GlobalEventHandlers/ontransitionend", "ontransitionend")}}
+ +

+ +

このコードは、トランジションが定義されており、 transitionend イベントにリスナーを追加している要素を取得します。

+ +
const transition = document.querySelector('.transition');
+
+transition.addEventListener('transitionend', () => {
+  console.log('トランジション終了');
+});
+ +

同様に、 {{domxref("GlobalEventHandlers/ontransitionend", "ontransitionend")}} を使用した例です。

+ +
const transition = document.querySelector('.transition');
+
+transition.ontransitionend = () => {
+  console.log('トランジション終了');
+};
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("CSS3 Transitions", "#transitionend", "transitionend")}}{{Spec2('CSS3 Transitions')}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("api.HTMLElement.transitionend_event")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf