HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

translate

Description

The translate function for CSS specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter. If the second parameter is not provided, it has a zero value.

Syntax

CSS

translate()

Values

<translate()> =
    translate(
        <length-percentage> ,
        <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