A reference guide for the CSS rotateX() function, which rotates elements around the x-axis in 3D space. Covers syntax, angle unit types (deg, grad, rad, turn), and the importance of the perspective and transform-style properties for realistic 3D effects. Includes practical examples: flip cards using backface-visibility, a 3D loading spinner combining rotateX() and rotateY() in keyframe animations, and a 3D accordion with transform-origin manipulation for a door-opening reveal effect.

6m read timeFrom css-tricks.com
Post cover image
Table of contents
SyntaxArgumentsSetting up 3D transformsBasic usageExample: 3D Loading spinnerExample: 3D accordionA note about transform-origin and rotateX()SpecificationBrowser Support

Sort: