coderef

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: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–15Not supported
16+Supportedsince Oct 9, 2012
Current: 157
Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27
MobileChrome Android
18–35Not supported
36+Supportedsince Jul 16, 2014
Current: 155
Firefox Android
4–15Not supported
16+Supportedsince Oct 9, 2012
Current: 157
Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27

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

Sub-features

Support for each part of the feature (30). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
transform361216936169
transform-origin361216936169
transform-origin.bottom361216936169
transform-origin.center361216936169
transform-origin.left361216936169
transform-origin.right361216936169
transform-origin.three_value_syntax361216936169
transform-origin.top361216936169
transform.none361216936169
<angle>2123.641843.2
<angle-percentage>2123.641843.2
<angle>.deg2123.641843.2
<angle>.grad2123.641843.2
<angle>.rad2123.641843.2
<angle>.turn21213418143.2
<position>112111841
<position>.four_value_syntax251213725147
<position>.keyword_value_syntax112111841
<transform-function>1123.53.11843.2
<transform-function>.matrix1123.53.11843.2
Show 10 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
<transform-function>.rotate1123.53.11843.2
<transform-function>.scale1123.53.11843.2
<transform-function>.scaleX1123.53.11843.2
<transform-function>.scaleY1123.53.11843.2
<transform-function>.skew1123.53.11843.2
<transform-function>.skewX1123.53.11843.2
<transform-function>.skewY1123.53.11843.2
<transform-function>.translate1123.53.11843.2
<transform-function>.translateX1123.53.11843.2
<transform-function>.translateY1123.53.11843.2