The -webkit-transform-3d Boolean CSS media feature is a WebKit extension whose value is true if vendor-prefixed CSS 3D transforms are supported.
[!NOTE] While this media feature is currently supported by most browsers. If possible, use an @supports feature query instead.
Syntax
-webkit-transform-3d is a Boolean CSS media feature whose value is true if the browser supports -webkit prefixed CSS 3D transforms.
Values
true- : The browser supports the 3D CSS transforms with the
-webkitprefix and supports non-standard, prefixed media queries.
- : The browser supports the 3D CSS transforms with the
false- : The 3D CSS transforms prefixed with
-webkitare not supported by the browser.
- : The 3D CSS transforms prefixed with
Examples
Examples of media queries with -webkit-transform-3d
@media (-webkit-transform-3d) {
.foo {
transform-style: preserve-3d;
}
}
A better method for checking for browser support is using a feature query:
@supports (transform-style) {
.foo {
transform-style: preserve-3d;
}
}
Specifications
Browser compatibility
See also
- @media/-webkit-transform-2d
- @media/-webkit-transition
- @media/-webkit-animation
- transform and using CSS transforms
- @media and Using media queries
- @supports and using feature queries
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
