translateX

The translateX CSS function specifies a translation by the given amount in the x direction.

Syntax

CSS

translateX()

Values

<translateX()> =
    translateX(
        <length-percentage>
    )
<length-percentage> =
    <length> |
    <percentage>
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

Examples

1 · length

2 · percentage

3 · JS

HomeMenu