Set a rotated element's base placement:
![]()
The transform-origin property is supported in Internet Explorer 10, Firefox, and Opera.
Internet Explorer 9 supports an alternative, the -ms-transform-origin property, but only for 2D-transforms.
Safari and Chrome supports an alternative, the -webkit-transform-origin property, on both 2D- and 3D-transfoms.
Opera supports 2D transforms only.
The transform-origin property allows you to change the position on transformed elements.
2D transformed element can change the x- and y-axis of the element. 3D transformed element can also change the z-axis of the element.
To better understand the transform-origin property, view a demo.
Note: This property must be used together with the transform property.
Tip: To better understand this property for 3D transforms, view a demo.
| Default value: | 50% 50% 0 |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.transformOrigin="20% 40%" |
| Property Value | Description |
|---|---|
| x-axis | Defining where the view is placed at the x-axis. Possible values:
|
| y-axis | Defining where the view is placed at the y-axis. Possible values:
|
| z-axis | Defining where the view is placed at the z-axis. Possible values:
|
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.