CSS - @starting-style

概要

ルール名@starting-style
構文@starting-style { ... }
サポートhttps://caniuse.com/mdn-css_at-rules_starting-style

説明

トランジション における開始時のスタイルを指定します。

使用例

独立ブロックとして記述する書き方と、他のブロックの中に記述する書き方があります。

.my-example:hover {
  opacity: 100%
}

@starting-style {
  .my-example:hover {
    opacity: 0%
  }
}
.my-example:hover {
  opacity: 100%
  @starting-style {
    opacity: 0%
  }
}

使い方の詳細は トランジション を参照してください。

関連項目

リンク