CSS - 2D Transforms



CSS provides a set of properties that allow you to transform and adjust the elements in the two-dimensional space. The properties that let you transform the elements include translations, rotations, scaling, skewing, etc.

The following table lists all the various properties that are used transform the elements in the two-dimensional space:

Property Description
rotate Rotates an element by a specified angle.
scale Scales by an element by a specified factor.
transform Transforms an element, such as rotates, scales, skews or translates.
transform-box Defines the layout box for transformation.
transform-origin Sets the origin for the transformation of an element.
translate Moves an element from its current position.
matrix() Defines the transformation of an element based on six matrix values.
rotate() Rotates an element around a fixed point in two-dimensional space.
rotateX() Rotates an element around the horizontal axis in two-dimensional space.
rotateY() Rotates an element around the vertical axis in two-dimensional space.
scale() Scales an element up or down in two-dimensional space.
scaleX() Scales an element up or down horizontally.
scaleY() Scales an element up or down vertically.
skew() Skews an element in two-dimensional space.
skewX() Skews an element in the horizontal direction.
skewY() Skews an element in the vertical direction.
translate() Translates an element in two-dimensional space.
translateX() Translates an element horizontally.
translateY() Translates an element vertically.
Advertisements