This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

rotate()

Summary

Rotates an element clockwise around its origin (as specified by the transform-origin property) by the specified angle. The operation corresponds to the matrix [cos(angle) sin(angle) -sin(angle) cos(angle) 0 0].

Examples

The following code snippet is an example of the rotate function in use.

div {
  transform: rotate(33.3deg);
}

View live example

Syntax

rotate ( <angle> )

Parameters

angle
The angle by which the element is rotated about its origin. If not specified otherwise, the element rotates around its center. The origin can be specified with the transform-origin property. This value is expressed as an integer or decimal number followed by a supported angle unit.

Standards information

Related specifications

CSS Transforms Module Level 3
Working Draft

See also

Related pages

Attributions