This property defines the origin of the transformation axes relative to the element to which the transformation is applied.
Overview table50% 50%
transform-origin: <named-position>
transform-origin: length
transform-origin: percentage
The value is a percentage of the bounding box width (for the X axis) or the bounding box height (for the Y axis, if specified). A percentage cannot be applied to the Z axis.
Units of measurement may be absolute (cm
, mm
, in
, pt
, or pc
) or relative (em
, ex
, or px
).
The values left
, center
, and right
are valid for the X axis and are equivalent to 0%, 50%, and 100% respectively. The values top
, center
, and bottom
are valid for the Y axis and are equivalent to 0%, 50%, and 100% respectively. There are no named positions along the Z axis.
#mytranselem {
transform-origin: 25% 50%;
}
#mytranselem {
transform-origin: 20px 25px 30px;
}
#mytranselem {
transform-origin: right;
}
Notes
The origin may be moved along all three axes with this single property by specifying the relative position of each axis in X, Y, Z order. The grid complies with the right-hand rule for Cartesian coordinate systems. The x-axis increases from left to right; the y-axis increases from top to bottom; and the z-axis increases away from the user (higher z-values are more distant).
Microsoft deprecated -ms-transform-origin
, the vendor-prefixed version of this property, with the release of Internet Explorer 10. It should only be included for compatibility with earlier versions.
If the transform-origin
property is not set, the transform begins in the center at screen level (equal to a transform-origin
value of 50% 50% 0
).
0
(screen level).50%
.Microsoft Developer Network: Windows Internet Explorer API reference Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4