Transform Property

Last updated: 2026-09-13

transform Transform Property

The transform property applies 2D or 3D geometric transformations to an element, including translation, rotation, scaling, and skewing. Transformations happen at the rendering stage and do not affect document flow layout, which makes them a common tool for high-performance visual effects. transform is one of the core properties of CSS animation and interaction design.

Category
Initial Valuenone
InheritedNo
Applies Toall
Animation Typetransform
CSS VersionCSS3
StatusStandard

📝 Syntax

transform: none | <transform-function>+;
/* <transform-function> = translate() | translate3d() | rotate() | rotate3d() | scale() | skew() | matrix() | perspective() etc. */

⚙️ Values

ValueTypeDescription
noneKeywordNo transform is applied
<transform-list>TypeA list of transform functions: translate, rotate, scale, skew, and others

▶ Example

Edit the code below and see the live result in the playground:

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
transform v36 v12 v16 v9 v23
Supported in all major browsers
Tip: Multiple transform functions in one transform value are separated by spaces and applied from right to left — the rightmost function applies first — so the order matters and changing it can produce a different result.
Warning: transform creates a new stacking context and containing block, which can change the positioning reference of position: fixed children.

❓ FAQ

QDoes the CSS transform property affect the layout of surrounding elements?
ANo. transform is a visual transformation handled during compositing: the element still occupies its original space and size in the document flow, so surrounding elements are completely unaffected and no reflow is triggered. That is exactly why transform animations perform far better than animating left or top. Note that the transformed element becomes the containing block for any position: fixed descendants.
QWhat is the difference between 2D transform and 3D transform?
A2D transforms work in the X/Y plane — translate(), rotate(), scale(), and skew(). 3D transforms add the Z axis with functions such as translateZ, rotateX, and rotateY. To see real depth you usually need a perspective on the parent element, often combined with transform-style: preserve-3d so children keep their 3D positions.
QWhy are transform animations fast? Do they use GPU acceleration?
AAnimating transform never triggers layout or repaint. The browser promotes the element to its own compositor layer, which the GPU composites, so the motion stays smooth even while the page scrolls or overlaps other elements. Compared with left/top, which force a reflow every frame, transform is the preferred way to reach 60fps animation, and adding will-change makes the result even more stable.
QIn what order are transform functions applied? Does translate before rotate matter?
AFunctions are applied from right to left: the rightmost one takes effect first. For example, transform: translate(20px) rotate(45deg) rotates first and then translates along the rotated direction, while transform: rotate(45deg) translate(20px) translates first and then rotates — the final results are completely different.

📚 Related Tutorials

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏