rotateY() | Endigest
CSS-Tricks
|FrontendGet the latest tech trends every morning
Receive daily AI-curated summaries of engineering articles from top tech companies worldwide.
The rotateY() function rotates an element around its vertical y-axis in CSS, creating horizontal flip effects from left to right.
- •The function accepts angle values in degrees (deg), gradians (grad), radians (rad), or turns (turn) to define rotation amount
- •Perspective property on parent elements is required to create visible 3D depth effects, with lower values creating closer appearance
- •The transform-style: preserve-3d property determines whether child elements are positioned in 3D space or flattened
- •Common use cases include flip cards with backface-visibility: hidden, 3D image carousels with cylindrical positioning, and page-turning animations
- •Advanced techniques use transform-origin to define rotation points and combine rotateY() with translateZ() for depth positioning
This summary was automatically generated by AI based on the original article and may not be fully accurate.