asp.net.ph

Skip Navigation LinksAbakada: Back to Basics > Language References > CSS Properties > Transform Functions > translateY( ) Transform Function

translateY( ) Transform Function


Repositions an element in a vertical direction.

Syntax:

{ transform: translateY( length ) }

Possible Values

y-length Required. Floating point number representing the vertical coordinate.

Remarks:

The translateY( ) CSS function defines a transformation that repositions an element in the vertical direction.

The coordinate defines how much the element moves.

A value of 0 leaves the input unchanged.

If positive, the movement will be downwards. If negative, the movement will be upwards.

A percentage for vertical translations is relative to the height of the reference box.

Example

The following example demonstrates the effects of applying the translateY( ) function to change an element’s position on the 2D plane.

 Show me 

For a brief overview, please see Understanding and Using CSS Transforms.

See Also

translate( ), translateX( )



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note