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);
}
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
- CSS Transforms Module, Level 3, Section 13.1
Related specifications
- CSS Transforms Module Level 3
- Working Draft
See also
Related pages
Transform Functions
- Mathematical Description of Transform FunctionsMathematical Description of Transform Functions
- Hands On: 2D TransformsHands On: 2D Transforms
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]