translateX() q3l6y
The translateX() function is a 2D transform function used to translate an element along the x-axis. 1en6m
It takes a translation value tx as an argument. This value specifies the amount by which an element is to be translated.
The translation value tx is provided either as a percentage
. Not including a unit type will cause the number to be interpreted as a “ unit”.
Positive translation values will move the element along the positive direction of the x-axis, and negative values will move it in the opposite direction.
Examples:
transform: translateX(300px); transform: translateX(-50%); transform: translateX(150%);
The official syntax looks as follows:
transform: translate(tx);
For a better understanding of the transform functions, please refer to the transform entry.
Browser k5t66
The following is the table for two-dimensional CSS transformations:
CSS3 2D Transforms 291431
Method of transforming an element including rotating, scaling, etc. Includes for `transform` as well as `transform-origin` properties.
W3C Working Draft
ed from the following versions:
Desktop 3n671n
- 36
- 16
- 10
- 12
- 9
Mobile / Tablet 4q224p
- 9.0
- 66
- No
- 66
- 60