非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。

-webkit-transform-2d 布尔 CSS media feature Chrome extension whose value is true if vendor-prefixed CSS 2D transform s are supported.

Apple has a description in Safari CSS Reference .

句法

-webkit-transform-2d is a Boolean CSS media feature whose value is true if the browser supports -webkit prefixed CSS 2D transform s.

true
The browser supports the 2D CSS transforms with the -webkit prefix.
false
The 2D CSS transforms prefixed with -webkit are not supported by the browser.

范例

基本范例

@media (-webkit-transform-2d) {
  div {
    -webkit-transform: translate(100px, 100px);
  }
}
					

This media feature is only supported by WebKit. If possible, use an @supports feature query instead:

@supports (-webkit-transform: translate(100px, 100px)) {
  div {
    -webkit-transform: translate(100px, 100px);
  }
}
					

规范

Not part of any standard.

浏览器兼容性

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
-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

图例

完整支持

完整支持

不支持

不支持

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

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

另请参阅

元数据

  • 最后修改: