CARVIEW |
Select Language
HTTP/2 200
content-type: text/html
x-guploader-uploadid: AAwnv3J2cp3qYMDTheLtCzKi3ilGC0oBRu4XNcbmpMD3IU-MXXuxHOEDTdDXbwyAdXFEntqGLY38sOg
cache-control: public, max-age=3600
expires: Tue, 07 Oct 2025 08:41:06 GMT
last-modified: Tue, 07 Oct 2025 01:15:21 GMT
etag: W/"210a4982e1f5e3226354fa4b69ff40d3"
x-goog-generation: 1759799721002084
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 271141
x-goog-meta-goog-reserved-file-mtime: 1759797741
x-goog-hash: crc32c=mJdQGw==, md5=IQpJguH14yJjVPpLaf9A0w==
x-goog-storage-class: STANDARD
accept-ranges: none
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
alt-svc: clear
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
strict-transport-security: max-age=63072000
content-security-policy: default-src 'self'; script-src 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; script-src-elem 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; style-src 'report-sample' 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' developer.allizom.org bcd.developer.allizom.org bcd.developer.mozilla.org updates.developer.allizom.org updates.developer.mozilla.org https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://incoming.telemetry.mozilla.org https://observatory-api.mdn.allizom.net https://observatory-api.mdn.mozilla.net https://api.github.com/search/issues stats.g.doubleclick.net https://api.stripe.com; font-src 'self'; frame-src 'self' interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net mdn.github.io live-samples.mdn.mozilla.net live-samples.mdn.allizom.net *.mdnplay.dev *.mdnyalp.dev *.play.test.mdn.allizom.net https://v2.scrimba.com https://scrimba.com jsfiddle.net www.youtube-nocookie.com codepen.io survey.alchemer.com https://js.stripe.com; img-src 'self' data: *.githubusercontent.com *.googleusercontent.com *.gravatar.com mozillausercontent.com firefoxusercontent.com profile.stage.mozaws.net profile.accounts.firefox.com developer.mozilla.org mdn.dev interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net wikipedia.org upload.wikimedia.org https://mdn.github.io/shared-assets/ https://mdn.dev/ https://*.google-analytics.com https://*.googletagmanager.com www.gstatic.com; manifest-src 'self'; media-src 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; child-src 'self'; worker-src 'self';
x-frame-options: DENY
origin-trial: AxVILwizhbMjxFeHOn1P3R8niO1RJY/smaK4B4d1rLzc1gTaxtXMSaTi+FoigYgCw40uFRDwFcEAeqDR+vVLOW4AAABfeyJvcmlnaW4iOiJodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZyIsImZlYXR1cmUiOiJQcml2YXRlQXR0cmlidXRpb25WMiIsImV4cGlyeSI6MTc0MjA3OTYwMH0=
x-cloud-trace-context: 71730e050ee9d2812efccac53b9fea4e;o=1
date: Tue, 07 Oct 2025 07:41:07 GMT
server: Google Frontend
via: 1.1 google
vary: Accept-Encoding
content-encoding: gzip
x-cache: miss
prefers-reduced-transparency - CSS: カスケーディングスタイルシート | MDN
Toggle sidebar
>
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
prefers-reduced-transparency
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
prefers-reduced-transparency
は CSS のメディア特性で、ユーザーが端末で使用される透明または半透明のレイヤー効果を縮小する設定を有効にしているかどうかを検出するために使用されます。この設定をオンにすると、一部のユーザーのコントラストや読みやすさを改善することができます。
構文
no-preference
-
ユーザーが端末で環境設定を行っていないことを示します。このキーワード値は、論理値コンテキストでは false として評価されます。
reduce
-
ユーザーが端末で、透明または半透明のレイヤー効果を最小限に抑える設定を有効にしていることを示します。
ユーザー設定
さまざまなオペレーティングシステムでは、透明度を低下させる設定が提供されており、ユーザーエージェントはこれらのシステム設定に準拠する傾向が強くあります。 また、特定の設定を提供していないプラットフォームでは、より曖昧な手掛かりに依存する場合もあります。
- Windows 10/11: 設定 > 個人用設定 > 色 > 透明効果
- macOS: System Preferences > Accessibility > Display > Reduce transparency
- iOS: Settings > Accessibility > Display & Text Size > Reduce Transparency
例
この例では、既定で半透明のボックスが表示されています。使用している端末のアクセシビリティ設定で透明度を下げる設定が有効になっている場合、半透明のボックスは不透明になります。
HTML
html
<div class="translucent">半透明のボックス</div>
CSS
css
.translucent {
opacity: 0.4;
}
@media (prefers-reduced-transparency) {
.translucent {
opacity: 0.8;
}
}
仕様書
Specification |
---|
Media Queries Level 5> # prefers-reduced-transparency> |
ブラウザーの互換性
Loading…
関連情報
- CSS の prefers-reduced-motion メディアクエリー
- メディアクエリーの使用