From 8b42f444c5c10e0abc2b8015a0a68e3798f9bea9 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 22 Jan 2022 22:56:36 +0900 Subject: CSS animations 系のプロパティを移行 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/animation-fill-mode/index.html | 185 ------------------------ files/ja/web/css/animation-fill-mode/index.md | 185 ++++++++++++++++++++++++ 2 files changed, 185 insertions(+), 185 deletions(-) delete mode 100644 files/ja/web/css/animation-fill-mode/index.html create mode 100644 files/ja/web/css/animation-fill-mode/index.md (limited to 'files/ja/web/css/animation-fill-mode') diff --git a/files/ja/web/css/animation-fill-mode/index.html b/files/ja/web/css/animation-fill-mode/index.html deleted file mode 100644 index a5fc4e219d..0000000000 --- a/files/ja/web/css/animation-fill-mode/index.html +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: animation-fill-mode -slug: Web/CSS/animation-fill-mode -tags: - - CSS - - CSS アニメーション - - CSS プロパティ - - リファレンス -translation_of: Web/CSS/animation-fill-mode ---- -
{{CSSRef}}
- -

CSSanimation-fill-mode プロパティは、 CSS アニメーションの実行の前後にどう対象にスタイルを適用するかを設定します。

- -
{{EmbedInteractiveExample("pages/css/animation-fill-mode.html")}}
- - - -

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

- -

構文

- -
/* 単一のアニメーション */
-animation-fill-mode: none;
-animation-fill-mode: forwards;
-animation-fill-mode: backwards;
-animation-fill-mode: both;
-
-/* 複数のアニメーション */
-animation-fill-mode: none, backwards;
-animation-fill-mode: both, forwards, none;
-
- -

- -
-
none
-
アニメーションが実行されていない時は、対象にスタイルを適用しません。要素は適用されているその他の CSS 規則を使用して表示されます。これが既定値です。
-
forwards
-
対象は実行の最後のキーフレームで設定された計算値を保持します。最後のキーフレームは {{cssxref("animation-direction")}} と {{cssxref("animation-iteration-count")}} の値によって変わります。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
animation-directionanimation-iteration-count最後のキーフレーム
normal偶数または奇数100% または to
reverse偶数または奇数0% または from
alternate偶数0% または from
alternate奇数100% または to
alternate-reverse偶数100% または to
alternate-reverse奇数0% または from
-
-
backwards
-
アニメーションは最初の適切なキーフレームで定義された値を対象に適用されると同時に適用し、 {{cssxref("animation-delay")}} の期間これを保持します。最初の適切なキーフレームは、 {{cssxref("animation-direction")}} の値によって変わります。 - - - - - - - - - - - - - - - - - -
animation-direction最初の適切なキーフレーム
normal または alternate0% または from
reverse または alternate-reverse100% または to
-
-
both
-
アニメーションは forwards と backwards の両方の既定に従います。よって、アニメーションの設定は実行前と実行後の両方に適用されます。
-
- -
-

メモ: animation-* プロパティにコンマ区切りで複数の値を指定した場合、 {{cssxref("animation-name")}} プロパティで指定したアニメーションに割り当てられますが、いくつあるかによって異なる方法で割り当てられます。詳しくは、複数のアニメーションプロパティ値の設定 を参照してください。

-
- -

形式文法

- -{{csssyntax}} - -

- -

以下の例で animation-fill-mode の効果を見ることができます。これは無限に繰り返されるアニメーションが、元の状態に戻るのではなく最後の状態を維持するようにすることができます(既定の状態)。

- -

HTML

- -
<p>マウスを灰色のボックスの上に乗せてください!</p>
-<div class="demo">
- <div class="growsandstays">これは大きくなって大きいままになります。</div>
-  <div class="grows">これは大きくなるだけです。</div>
-</div>
- -

CSS

- -
.demo {
-  border-top: 100px solid #ccc;
-  height: 300px;
-}
-
-@keyframes grow {
-  0% { font-size: 0; }
-  100% { font-size: 40px; }
-}
-
-.demo:hover .grows {
-  animation-name: grow;
-  animation-duration: 3s;
-}
-
-.demo:hover .growsandstays {
-  animation-name: grow;
-  animation-duration: 3s;
-  animation-fill-mode: forwards;
-}
- -

{{EmbedLiveSample('Example',700,300)}}

- -

これ以外の例は CSS アニメーションを参照してください。

- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS3 Animations', '#animation-fill-mode', 'animation-fill-mode')}}{{Spec2('CSS3 Animations')}}初回定義
- -

{{cssinfo}}

- -

ブラウザーの対応

- -

{{Compat("css.properties.animation-fill-mode")}}

- -

関連情報

- - diff --git a/files/ja/web/css/animation-fill-mode/index.md b/files/ja/web/css/animation-fill-mode/index.md new file mode 100644 index 0000000000..a5fc4e219d --- /dev/null +++ b/files/ja/web/css/animation-fill-mode/index.md @@ -0,0 +1,185 @@ +--- +title: animation-fill-mode +slug: Web/CSS/animation-fill-mode +tags: + - CSS + - CSS アニメーション + - CSS プロパティ + - リファレンス +translation_of: Web/CSS/animation-fill-mode +--- +
{{CSSRef}}
+ +

CSSanimation-fill-mode プロパティは、 CSS アニメーションの実行の前後にどう対象にスタイルを適用するかを設定します。

+ +
{{EmbedInteractiveExample("pages/css/animation-fill-mode.html")}}
+ + + +

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

+ +

構文

+ +
/* 単一のアニメーション */
+animation-fill-mode: none;
+animation-fill-mode: forwards;
+animation-fill-mode: backwards;
+animation-fill-mode: both;
+
+/* 複数のアニメーション */
+animation-fill-mode: none, backwards;
+animation-fill-mode: both, forwards, none;
+
+ +

+ +
+
none
+
アニメーションが実行されていない時は、対象にスタイルを適用しません。要素は適用されているその他の CSS 規則を使用して表示されます。これが既定値です。
+
forwards
+
対象は実行の最後のキーフレームで設定された計算値を保持します。最後のキーフレームは {{cssxref("animation-direction")}} と {{cssxref("animation-iteration-count")}} の値によって変わります。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
animation-directionanimation-iteration-count最後のキーフレーム
normal偶数または奇数100% または to
reverse偶数または奇数0% または from
alternate偶数0% または from
alternate奇数100% または to
alternate-reverse偶数100% または to
alternate-reverse奇数0% または from
+
+
backwards
+
アニメーションは最初の適切なキーフレームで定義された値を対象に適用されると同時に適用し、 {{cssxref("animation-delay")}} の期間これを保持します。最初の適切なキーフレームは、 {{cssxref("animation-direction")}} の値によって変わります。 + + + + + + + + + + + + + + + + + +
animation-direction最初の適切なキーフレーム
normal または alternate0% または from
reverse または alternate-reverse100% または to
+
+
both
+
アニメーションは forwards と backwards の両方の既定に従います。よって、アニメーションの設定は実行前と実行後の両方に適用されます。
+
+ +
+

メモ: animation-* プロパティにコンマ区切りで複数の値を指定した場合、 {{cssxref("animation-name")}} プロパティで指定したアニメーションに割り当てられますが、いくつあるかによって異なる方法で割り当てられます。詳しくは、複数のアニメーションプロパティ値の設定 を参照してください。

+
+ +

形式文法

+ +{{csssyntax}} + +

+ +

以下の例で animation-fill-mode の効果を見ることができます。これは無限に繰り返されるアニメーションが、元の状態に戻るのではなく最後の状態を維持するようにすることができます(既定の状態)。

+ +

HTML

+ +
<p>マウスを灰色のボックスの上に乗せてください!</p>
+<div class="demo">
+ <div class="growsandstays">これは大きくなって大きいままになります。</div>
+  <div class="grows">これは大きくなるだけです。</div>
+</div>
+ +

CSS

+ +
.demo {
+  border-top: 100px solid #ccc;
+  height: 300px;
+}
+
+@keyframes grow {
+  0% { font-size: 0; }
+  100% { font-size: 40px; }
+}
+
+.demo:hover .grows {
+  animation-name: grow;
+  animation-duration: 3s;
+}
+
+.demo:hover .growsandstays {
+  animation-name: grow;
+  animation-duration: 3s;
+  animation-fill-mode: forwards;
+}
+ +

{{EmbedLiveSample('Example',700,300)}}

+ +

これ以外の例は CSS アニメーションを参照してください。

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Animations', '#animation-fill-mode', 'animation-fill-mode')}}{{Spec2('CSS3 Animations')}}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ +

{{Compat("css.properties.animation-fill-mode")}}

+ +

関連情報

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