User Preferences API
The reducedTransparency read-only property of the PreferenceManager interface returns the PreferenceObject used to override the user's preference for the reduced transparency of the site.
Valid reducedTransparency PreferenceObject.value settings are reduce and no-preference.
Value
A PreferenceObject used to override the user's preference for the reduced transparency of the site.
Examples
Basic usage
This example demonstrates how to query the user's reduced transparency preference.
if (navigator.preferences.reducedTransparency.value === "reduce") {
// The user prefers reduced transparency.
} else {
// The user has stated no preference regarding transparency.
}
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
