CSS Conditional Rules is a CSS module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to.

参考

At-rules

规范

规范 状态 注释
CSS Conditional Rules Module Level 3 候选推荐 初始定义

浏览器兼容性

@document rule

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
@document Experimental 非标 Chrome 不支持 No Edge 不支持 No Firefox 完整支持 61 Prefixed 注意事项 Disabled
完整支持 61 Prefixed 注意事项 Disabled
Prefixed Implemented with the vendor prefix: -moz-
注意事项 Disabled by default in web pages, except for an empty url-prefix() value, which is supported due to its use in Firefox browser detection . Still supported in user stylesheets.
Disabled From version 61: this feature is behind the layout.css.moz-document.content.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 1.5 — 61 Prefixed
Prefixed Implemented with the vendor prefix: -moz-
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 完整支持 61 Prefixed 注意事项 Disabled
完整支持 61 Prefixed 注意事项 Disabled
Prefixed Implemented with the vendor prefix: -moz-
注意事项 Disabled by default in web pages, except for an empty url-prefix() value, which is supported due to its use in Firefox browser detection . Still supported in user stylesheets.
Disabled From version 61: this feature is behind the layout.css.moz-document.content.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 4 — 61 Prefixed
Prefixed Implemented with the vendor prefix: -moz-
Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
regexp() Experimental 非标 Chrome 不支持 No Edge 不支持 No Firefox 完整支持 6 IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 完整支持 6 Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No

图例

完整支持

完整支持

不支持

不支持

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

非标。预期跨浏览器支持较差。

非标。预期跨浏览器支持较差。

见实现注意事项。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

要求使用供应商前缀或不同名称。

要求使用供应商前缀或不同名称。

@import rule

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
@import Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 1 IE 完整支持 5.5 Opera 完整支持 3.5 Safari 完整支持 1 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0

图例

完整支持

完整支持

@media rule

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
@media Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 1 IE 完整支持 6 Opera 完整支持 9.2 Safari 完整支持 1.3 WebView Android 完整支持 1 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
any-hover media feature Chrome 完整支持 41 Edge 完整支持 16 Firefox 完整支持 64 IE 不支持 No Opera 完整支持 28 Safari 完整支持 9 WebView Android 完整支持 41 Chrome Android 完整支持 41 Firefox Android 完整支持 64 Opera Android 完整支持 28 Safari iOS 完整支持 9 Samsung Internet Android 完整支持 5.0
any-pointer media feature Chrome 完整支持 41 Edge 完整支持 12 Firefox 完整支持 64 IE 不支持 No Opera 完整支持 28 Safari 完整支持 9 WebView Android 完整支持 41 Chrome Android 完整支持 41 Firefox Android 完整支持 64 Opera Android 完整支持 28 Safari iOS 完整支持 9 Samsung Internet Android 完整支持 4.0
aspect-ratio media feature Chrome 完整支持 3 Edge 完整支持 12 Firefox 完整支持 3.5 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 5 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 4.2 Samsung Internet Android 完整支持 1.0
calc() expressions Chrome 完整支持 66 Edge 完整支持 79 Firefox 完整支持 59 IE 不支持 No Opera 完整支持 53 Safari 完整支持 12 WebView Android 完整支持 66 Chrome Android 完整支持 66 Firefox Android 完整支持 59 Opera Android 完整支持 47 Safari iOS 完整支持 12 Samsung Internet Android 完整支持 9.0
color media feature Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
color-gamut media feature Chrome 完整支持 58 Edge 完整支持 79 Firefox 不支持 No IE 不支持 No Opera 完整支持 45 Safari 完整支持 10 WebView Android 完整支持 58 Chrome Android 完整支持 58 Firefox Android 不支持 No Opera Android 完整支持 43 Safari iOS 完整支持 10 Samsung Internet Android 完整支持 7.0
color-index media feature Chrome 完整支持 29 Edge 完整支持 79 Firefox 不支持 No IE 不支持 No Opera 完整支持 16 Safari 完整支持 8 WebView Android 完整支持 ≤37 Chrome Android 完整支持 29 Firefox Android 不支持 No Opera Android 完整支持 16 Safari iOS 完整支持 8 Samsung Internet Android 完整支持 2.0
device-aspect-ratio media feature 弃用 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
device-height media feature 弃用 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
device-width media feature 弃用 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
display-mode media feature Chrome 完整支持 45 Edge 完整支持 79 Firefox 完整支持 47 注意事项
完整支持 47 注意事项
注意事项 Firefox 47 and later support display-mode fullscreen and browser . Firefox 57 added support for minimal-ui and standalone values.
IE 不支持 No Opera 完整支持 32 Safari 完整支持 13 WebView Android 完整支持 45 Chrome Android 完整支持 45 Firefox Android 完整支持 47 注意事项
完整支持 47 注意事项
注意事项 Firefox 47 and later support display-mode fullscreen and browser . Firefox 57 added support for minimal-ui and standalone values.
Opera Android 完整支持 32 Safari iOS 完整支持 13 Samsung Internet Android 完整支持 5.0
forced-colors media feature Experimental Chrome 完整支持 79 注意事项 Disabled
完整支持 79 注意事项 Disabled
注意事项 bug 970285 .
Disabled ). To change preferences in Chrome, visit
Edge 完整支持 79 Firefox 完整支持 81 Disabled
完整支持 81 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 970285 .
Chrome Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 970285 .
Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 970285 .
grid media feature Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 10 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
height media feature Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
hover media feature Chrome 完整支持 38 注意事项
完整支持 38 注意事项
注意事项 Before Chrome 41, the implementation was buggy and reported (hover: none) on non-touch-based computers with a mouse/trackpad. See bug 441613 .
Edge 完整支持 12 Firefox 完整支持 64 IE 不支持 No Opera 完整支持 28 Safari 完整支持 9 WebView Android 完整支持 38 注意事项
完整支持 38 注意事项
注意事项 Before Chrome 41, the implementation was buggy and reported (hover: none) on non-touch-based computers with a mouse/trackpad. See bug 441613 .
Chrome Android 完整支持 50 Firefox Android 完整支持 64 Opera Android 完整支持 28 Safari iOS 完整支持 9 Samsung Internet Android 完整支持 5.0
inverted-colors media feature Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 完整支持 9.1 WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 完整支持 10 Samsung Internet Android 不支持 No
Media feature expressions Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 1 IE 完整支持 9 Opera 完整支持 9.2 Safari 完整支持 1.3 WebView Android 完整支持 1 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 3.1 Samsung Internet Android 完整支持 1.0
Media query value support Chrome 完整支持 66 Edge 完整支持 79 Firefox 完整支持 59 IE 不支持 No Opera 完整支持 53 Safari 不支持 No WebView Android 完整支持 66 Chrome Android 完整支持 66 Firefox Android 完整支持 59 Opera Android 完整支持 47 Safari iOS 不支持 No Samsung Internet Android 完整支持 9.0
monochrome media feature Chrome 完整支持 1 Edge 完整支持 79 Firefox 完整支持 2 IE 不支持 No Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
Nested media queries Chrome 完整支持 26 Edge 完整支持 12 Firefox 完整支持 11 IE 不支持 No Opera 完整支持 12.1 Safari 完整支持 6.1 WebView Android 完整支持 ≤37 Chrome Android 完整支持 26 Firefox Android 完整支持 14 Opera Android 完整支持 12.1 Safari iOS 完整支持 7 Samsung Internet Android 完整支持 1.5
orientation media feature Chrome 完整支持 3 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10.6 Safari 完整支持 5 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 11 Safari iOS 完整支持 4.2 Samsung Internet Android 完整支持 1.0
overflow-block media feature Chrome 不支持 No Edge 不支持 No Firefox 完整支持 66 IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 完整支持 66 Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
overflow-inline media feature Chrome 不支持 No Edge 不支持 No Firefox 完整支持 66 IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 完整支持 66 Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
pointer media feature Chrome 完整支持 41 Edge 完整支持 12 Firefox 完整支持 64 IE 不支持 No Opera 完整支持 28 Safari 完整支持 9 WebView Android 完整支持 41 Chrome Android 完整支持 50 Firefox Android 完整支持 64 Opera Android 完整支持 28 Safari iOS 完整支持 9 Samsung Internet Android 完整支持 5.0
prefers-color-scheme media feature Chrome 完整支持 76 Edge 完整支持 79 Firefox 完整支持 67 IE 不支持 No Opera 完整支持 62 Safari 完整支持 12.1 WebView Android 完整支持 76 Chrome Android 完整支持 76 Firefox Android 不支持 No Opera Android 完整支持 54 Safari iOS 完整支持 13 Samsung Internet Android 完整支持 12.0
prefers-contrast media feature Experimental Chrome 不支持 No Edge 不支持 No Firefox 完整支持 80 Disabled
完整支持 80 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
prefers-reduced-data media feature Experimental Chrome 完整支持 85 注意事项 Disabled
完整支持 85 注意事项 Disabled
注意事项 bug 1051189 .
Disabled ). To change preferences in Chrome, visit
Edge 完整支持 85 注意事项 Disabled
完整支持 85 注意事项 Disabled
注意事项 bug 1051189 .
Disabled From version 85: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to Enabled ).
Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 1051189 .
Chrome Android 完整支持 85 注意事项 Disabled
完整支持 85 注意事项 Disabled
注意事项 bug 1051189 .
Disabled ). To change preferences in Chrome, visit
Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
prefers-reduced-motion media feature Chrome 完整支持 74 Edge 完整支持 79 Firefox 完整支持 63 IE 不支持 No Opera 完整支持 62 Safari 完整支持 10.1 WebView Android 完整支持 74 Chrome Android 完整支持 74 Firefox Android 完整支持 64 Opera Android 完整支持 53 Safari iOS 完整支持 10.3 Samsung Internet Android 完整支持 11.0
prefers-reduced-transparency media feature Experimental Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
resolution media feature Chrome 完整支持 29 Edge 完整支持 12 Firefox 完整支持 8
完整支持 8
部分支持 3.5 注意事项
注意事项 Supports <integer> values only.
IE 完整支持 9 Opera 完整支持 16
完整支持 16
不支持 10 — 15
Safari 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 78087 .
WebView Android 完整支持 ≤37 Chrome Android 完整支持 29 Firefox Android 完整支持 8
完整支持 8
部分支持 4 注意事项
注意事项 Supports <integer> values only.
Opera Android 完整支持 16
完整支持 16
不支持 10.1 — 14
Safari iOS 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 78087 .
Samsung Internet Android 完整支持 2.0
scan media feature Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
scripting media feature Chrome 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 489957 .
Edge 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 489957 .
Firefox 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 1166581 .
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 489957 .
Chrome Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 489957 .
Firefox Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 1166581 .
Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 489957 .
speech media type Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 完整支持 9.2 Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 完整支持 10.1 Safari iOS 不支持 No Samsung Internet Android 不支持 No
update media feature Chrome 不支持 No Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
width media feature Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 2 IE 完整支持 9 Opera 完整支持 10 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 4 Opera Android 完整支持 10.1 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
-moz-device-pixel-ratio media feature 弃用 非标 Chrome 不支持 No Edge 不支持 No Firefox 完整支持 4 IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 完整支持 4 Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 不支持 No
-webkit-animation media feature 弃用 非标 Chrome 不支持 2 — 36 Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 15 — 23 Safari 完整支持 4 WebView Android 不支持 ≤37 — ≤37 Chrome Android 不支持 18 — 36 Firefox Android 不支持 No Opera Android 不支持 14 — 24 Safari iOS 完整支持 3.2 Samsung Internet Android 不支持 1.0 — 3.0
-webkit-device-pixel-ratio media feature 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 63 注意事项
完整支持 63 注意事项
注意事项 Implemented as an alias for for -moz-device-pixel-ratio .
完整支持 49 注意事项 Disabled
注意事项 Implemented as an alias for for -moz-device-pixel-ratio .
Disabled From version 49: this feature is behind the layout.css.prefixes.device-pixel-ratio-webkit preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 45 注意事项 Disabled
注意事项 Implemented as an alias for for -moz-device-pixel-ratio .
Disabled From version 45: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true ) and the preference (needs to be set to ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 完整支持 15 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 63 注意事项
完整支持 63 注意事项
注意事项 Implemented as an alias for for -moz-device-pixel-ratio .
完整支持 49 注意事项 Disabled
注意事项 Implemented as an alias for for -moz-device-pixel-ratio .
Disabled From version 49: this feature is behind the layout.css.prefixes.device-pixel-ratio-webkit preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 45 注意事项 Disabled
注意事项 Implemented as an alias for for -moz-device-pixel-ratio .
Disabled From version 45: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true ) and the preference (needs to be set to ). To change preferences in Firefox, visit about:config.
Opera Android 完整支持 14 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
-webkit-max-device-pixel-ratio media feature 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 63 注意事项
完整支持 63 注意事项
注意事项 Implemented as an alias for for max--moz-device-pixel-ratio .
完整支持 49 注意事项 Disabled
注意事项 Implemented as an alias for for max--moz-device-pixel-ratio .
Disabled From version 49: this feature is behind the layout.css.prefixes.device-pixel-ratio-webkit preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 45 注意事项 Disabled
注意事项 Implemented as an alias for for max--moz-device-pixel-ratio .
Disabled From version 45: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true ) and the preference (needs to be set to ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 完整支持 15 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 63 注意事项
完整支持 63 注意事项
注意事项 Implemented as an alias for for max--moz-device-pixel-ratio .
完整支持 49 注意事项 Disabled
注意事项 Implemented as an alias for for max--moz-device-pixel-ratio .
Disabled From version 49: this feature is behind the layout.css.prefixes.device-pixel-ratio-webkit preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 45 注意事项 Disabled
注意事项 Implemented as an alias for for max--moz-device-pixel-ratio .
Disabled From version 45: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true ) and the preference (needs to be set to ). To change preferences in Firefox, visit about:config.
Opera Android 完整支持 14 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
-webkit-min-device-pixel-ratio media feature 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 完整支持 63 注意事项
完整支持 63 注意事项
注意事项 Implemented as an alias for for min--moz-device-pixel-ratio .
完整支持 49 注意事项 Disabled
注意事项 Implemented as an alias for for min--moz-device-pixel-ratio .
Disabled From version 49: this feature is behind the layout.css.prefixes.device-pixel-ratio-webkit preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 45 注意事项 Disabled
注意事项 Implemented as an alias for for min--moz-device-pixel-ratio .
Disabled From version 45: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true ) and the preference (needs to be set to ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 完整支持 15 Safari 完整支持 3 WebView Android 完整支持 ≤37 Chrome Android 完整支持 18 Firefox Android 完整支持 63 注意事项
完整支持 63 注意事项
注意事项 Implemented as an alias for for min--moz-device-pixel-ratio .
完整支持 49 注意事项 Disabled
注意事项 Implemented as an alias for for min--moz-device-pixel-ratio .
Disabled From version 49: this feature is behind the layout.css.prefixes.device-pixel-ratio-webkit preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
完整支持 45 注意事项 Disabled
注意事项 Implemented as an alias for for min--moz-device-pixel-ratio .
Disabled From version 45: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true ) and the preference (needs to be set to ). To change preferences in Firefox, visit about:config.
Opera Android 完整支持 14 Safari iOS 完整支持 1 Samsung Internet Android 完整支持 1.0
-webkit-transform-2d media feature 非标 Chrome 不支持 2 — 36 Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 15 — 23 Safari 完整支持 4 WebView Android 不支持 ≤37 — ≤37 Chrome Android 不支持 18 — 36 Firefox Android 不支持 No Opera Android 不支持 14 — 24 Safari iOS 完整支持 3.2 Samsung Internet Android 不支持 1.0 — 3.0
-webkit-transform-3d media feature 非标 Chrome 不支持 2 — 36 Edge 不支持 12 — 79 Firefox 完整支持 49
完整支持 49
完整支持 46 Disabled
Disabled preference (needs to be set to ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 15 — 23 Safari 完整支持 4 WebView Android 不支持 ≤37 — ≤37 Chrome Android 不支持 18 — 36 Firefox Android 完整支持 49
完整支持 49
完整支持 46 Disabled
Disabled preference (needs to be set to ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 14 — 24 Safari iOS 完整支持 3.2 Samsung Internet Android 不支持 1.0 — 3.0
-webkit-transition media feature 弃用 非标 Chrome 不支持 2 — 36 Edge 不支持 No Firefox 不支持 No IE 不支持 No Opera 不支持 15 — 23 Safari 完整支持 4 WebView Android 不支持 ≤37 — ≤37 Chrome Android 不支持 18 — 36 Firefox Android 不支持 No Opera Android 不支持 14 — 24 Safari iOS 完整支持 3.2 Samsung Internet Android 不支持 1.0 — 3.0

图例

完整支持

完整支持

不支持

不支持

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

非标。预期跨浏览器支持较差。

非标。预期跨浏览器支持较差。

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

@supports rule

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
@supports Chrome 完整支持 28 Edge 完整支持 12 Firefox 完整支持 22
完整支持 22
不支持 17 — 22 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 完整支持 12.1 Safari 完整支持 9 WebView Android 完整支持 ≤37 Chrome Android 完整支持 28 Firefox Android 完整支持 22
完整支持 22
不支持 17 — 22 Disabled
Disabled ). To change preferences in Firefox, visit
Opera Android 完整支持 12.1 Safari iOS 完整支持 9 Samsung Internet Android 完整支持 1.5
selector() Chrome 完整支持 83 Edge 完整支持 83 Firefox 完整支持 69
完整支持 69
完整支持 64 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 完整支持 69 Safari 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 199237
WebView Android 完整支持 83 Chrome Android 完整支持 83 Firefox Android 完整支持 64 Disabled
完整支持 64 Disabled
Disabled ). To change preferences in Firefox, visit
Opera Android 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 979041 .
Safari iOS 不支持 No 注意事项
不支持 No 注意事项
注意事项 bug 199237
Samsung Internet Android 完整支持 13.0

图例

完整支持

完整支持

不支持

不支持

见实现注意事项。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

元数据

  • 最后修改:
  1. CSS
  2. CSS 参考
  3. CSS Conditional Rules
  4. 指南
    1. Using feature queries
  5. At-Rules
    1. @document
    2. @media
    3. @supports

Copyright  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1