2D transformsBaseline · Widely available
The transform CSS property and its 2D transform functions allow rotating, scaling, skewing, and translating an element. Arbitrary 2D transforms are also possible using a transformation matrix.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 30, 2015. Widely available since Mar 30, 2018.
Browser support
DesktopChrome
1–35Not supported
36+Supportedsince Jul 16, 2014
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–15Not supported
16+Supportedsince Oct 9, 2012
Current: 157Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27MobileChrome Android
18–35Not supported
36+Supportedsince Jul 16, 2014
Current: 155Firefox Android
4–15Not supported
16+Supportedsince Oct 9, 2012
Current: 157Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: transform.
Feature detection
CSS · check before using
@supports (transform: initial) {
/* styles that rely on transform */
}
/* or in JavaScript */
if (CSS.supports("transform", "initial")) {
// use it
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (30). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| transform | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin.bottom | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin.center | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin.left | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin.right | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin.three_value_syntax | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform-origin.top | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| transform.none | 36 | 12 | 16 | 9 | 36 | 16 | 9 |
| <angle> | 2 | 12 | 3.6 | 4 | 18 | 4 | 3.2 |
| <angle-percentage> | 2 | 12 | 3.6 | 4 | 18 | 4 | 3.2 |
| <angle>.deg | 2 | 12 | 3.6 | 4 | 18 | 4 | 3.2 |
| <angle>.grad | 2 | 12 | 3.6 | 4 | 18 | 4 | 3.2 |
| <angle>.rad | 2 | 12 | 3.6 | 4 | 18 | 4 | 3.2 |
| <angle>.turn | 2 | 12 | 13 | 4 | 18 | 14 | 3.2 |
| <position> | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| <position>.four_value_syntax | 25 | 12 | 13 | 7 | 25 | 14 | 7 |
| <position>.keyword_value_syntax | 1 | 12 | 1 | 1 | 18 | 4 | 1 |
| <transform-function> | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.matrix | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
Show 10 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| <transform-function>.rotate | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.scale | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.scaleX | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.scaleY | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.skew | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.skewX | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.skewY | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.translate | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.translateX | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |
| <transform-function>.translateY | 1 | 12 | 3.5 | 3.1 | 18 | 4 | 3.2 |