HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Set a rotated element's base placement
The transformOrigin 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.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
transformOrigin | 36.0 | 10.0 | 16.0 | 9.0 | 23.0 |
Return the transformOrigin property:
Set the transformOrigin 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 (for 3D transforms). Possible values:
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | 50% 50% 0 |
---|---|
Return Value: | A String, representing the transform-origin property of an element |
CSS Version | CSS3 |
JavaScript Style Object: transform property
CSS reference: transform-origin property