From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../css/@media/prefers-reduced-motion/index.html | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 files/ja/web/css/@media/prefers-reduced-motion/index.html (limited to 'files/ja/web/css/@media/prefers-reduced-motion') diff --git a/files/ja/web/css/@media/prefers-reduced-motion/index.html b/files/ja/web/css/@media/prefers-reduced-motion/index.html new file mode 100644 index 0000000000..b284267a69 --- /dev/null +++ b/files/ja/web/css/@media/prefers-reduced-motion/index.html @@ -0,0 +1,133 @@ +--- +title: prefers-reduced-motion +slug: Web/CSS/@media/prefers-reduced-motion +tags: + - '@media' + - CSS + - Media Queries + - Reference + - media feature + - メディアクエリ + - メディア特性 +translation_of: Web/CSS/@media/prefers-reduced-motion +--- +

prefers-reduced-motionCSSメディア特性で、ユーザーが余計な動きを最少化するよう要求したことを検出するために使用します。

+ +
+

重要: このページの下部に埋め込まれた例は、拡大縮小の動きがありますが、一部の読者には問題があるかもしれません。前庭運動障害をお持ちの方は、アニメーションを見る前に、お使いの端末のモーション軽減機能を有効にしてください。

+
+ +

構文

+ +
+
no-preference
+
システムが把握している設定をユーザーが行っていないことを示します。
+
reduce
+
前庭運動障害者の不快感の引き金となるモーションベースのアニメーションの種類を削除したり置き換えたりするインターフェイスを希望することをユーザーがシステムに通知したことを示します。
+
+ +

ユーザー設定

+ +

Firefox では、 reduce の要求は以下の場合に尊重されます。

+ + + +

+ +

この例では、既定でで拡大縮小アニメーションが使用されています。アクセシビリティ設定で Reduce Motion を有効にしている場合、このアニメーションは前庭運動に影響のないシンプルなディゾルブにトーンダウンされます。

+ +

HTML

+ +
<div class="animation">animated box</div>
+
+ +

CSS

+ +
.animation {
+  animation: pulse 1s linear infinite both;
+}
+
+/* Tone down the animation to avoid vestibular motion triggers like scaling or panning large objects. */
+@media (prefers-reduced-motion) {
+  .animation {
+    animation-name: dissolve;
+  }
+}
+
+ + + +

結果

+ +

{{EmbedLiveSample("Examples")}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS5 Media Queries', '#descdef-media-prefers-reduced-motion', 'prefers-reduced-motion')}}{{Spec2('CSS5 Media Queries')}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.at-rules.media.prefers-reduced-motion")}}

+ +

関連情報

+ + + +
{{QuickLinksWithSubpages("/ja/docs/Web/CSS/@media/")}}
-- cgit v1.2.3-54-g00ecf