rotateX()

The CSS rotateX() function rotates an element around the x-axis in a three-dimensional space. Specifically, it vertically flips the element, making it tilt backward or forward, depending on the angle set. It is one of many transform functions used in the transform property. The x-axis is the axis of rotation, so the element turns Read more…

rotateY()

The CSS rotateY() function rotates an element around its vertical y-axis. Specifically, it horizontally flips an element from left to right (or right to left for that matter). It is one of many transform functions used along with the transform property. The y-axis is the axis of rotation, so the element turns horizontally. Imagine Read more…

rotateZ()

The CSS rotateZ() function rotates an element around its z-axis, so clockwise or counterclockwise. While it produces the same visual effect as the rotate() function, it’s best used in 3D transformations. It is one of many transform functions used along with the transform property. CodePen Embed Fallback In the demo, we first set up a stage Read more…

rotate()

The CSS rotate() function spins an element either clockwise or counterclockwise in a 2D plane. It is one of many transform functions used in the transform property. For example, using rotate() we can rotate the hand around the clock: .seconds-hand { transform: rotate(var(–deg)); transform-origin: bottom center; } CodePen Embed Fallback For rotating elements tri-dimensionally, consider using rotateX() and rotateY(). Read more…