Rotate

Also called CSS rotation

A CSS transform that turns an element around its transform origin by an angle, such as rotate(45deg).

What is Rotate?

transform: rotate(45deg) turns an element clockwise; negative angles turn it counterclockwise. CSS accepts deg, turn, and rad, so rotate(0.5turn) is the same as rotate(180deg). The element spins around its transform origin, the center by default, and plain rotate stays flat on the screen. rotateX and rotateY tilt it in 3D instead.

Common uses: a chevron that turns 180deg when an accordion opens, a plus icon that becomes a close icon at 45deg, a loading spinner that loops from 0 to 360deg, or a playful 2 to 3deg tilt on hover.

CSS animates the number itself, so going from 350deg to 10deg spins backward through 340 degrees. Animate to 370deg instead if you want the short way round. Use linear timing for spinners that loop forever, and slow or stop them for people who prefer reduced motion.

All terms

Transform origin

The point an element rotates and scales around. It defaults to the center, and moving it changes where a transform seems to start.

Spinner

A small looping animation, usually a rotating ring, that shows the app is busy with a short task of unknown length.

3D flip

A card that turns over in 3D to reveal a second face on its back, built with `rotateY` and `backface-visibility: hidden`.

Accordion

A vertical stack of headings that each expand to reveal their content when clicked, so long pages stay short and easy to scan.