CSS transform origin Property
CSS transform-origin Property
The transform-origin property is used to allow us to change the position of transformed elements. The 2D transformations can change the x- and y-axis of an element while the 3D transformations can also change the z-axis of an element.
Default Value:-
Its default value is 50% 50% 0.
Syntax:-
Its syntax is:- transform-origin: x-axis y-axis z-axis | initial | inherit;
Further Explanation:-
Property Value | Description |
---|---|
x-axis | Defines where the view is placed at the x-axis. |
y-axis | Defines where the view is placed at the y-axis. |
z-axis | Defines where the view is placed at the z-axis. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |