Search results
CSS 2D Transforms. CSS transforms allow you to move, rotate, scale, and skew elements. Mouse over the element below to see a 2D transformation: 2D rotate. In this chapter you will learn about the following CSS property: transform.
18 lip 2024 · The translate() CSS function repositions an element in the horizontal and/or vertical directions. Its result is a <transform-function> data type.
Definition and Usage. The transform property applies a 2D or 3D transformation to an element. This property allows you to rotate, scale, move, skew, etc., elements. Show demo . Browser Support. The numbers in the table specify the first browser version that fully supports the property. Syntax. transform: none| transform-functions |initial|inherit;
The translate property defines x- and y-coordinates of an element in 2D. You can also define the z-coordinate to change position in 3D. Coordinates can be given as only x-coordinates, x- and y-coordinates, or x-, y- and z-coordinates.
28 lis 2022 · The translate CSS property allows you to transfer an element from one place to another along the X (horizontal) axis, the Y (vertical) axis, and the Z (depth) axes, similar to how you might think of moving an element using offsets, like top, bottom, left, and right.
23 cze 2017 · .transformed { transform: translate(10px); /* equivalent to translateX(10px) */ background-color: blue; } Result.
6 wrz 2011 · The transform property allows you to visually manipulate an element by skewing, rotating, translating, or scaling: .element { width: 20px; height: 20px; transform: scale(20); } Even with a declared height and width, this element will now be scaled to twenty times its original size: