CSS rotate() Function

❮ Previous Functions Next ❯

Example

.example {
  transform: rotate(45deg);
}



Hello World!

Meaning

The rotate() css function defines a transformation that rotates an element around a fixed point on the 2D plane, without deforming it.

The fixed point that the element rotates around — mentioned above — is also known as the transform origin. This defaults to the center of the element, but you can set your own custom transform origin using the transform-origin property.

Version: CSS3




Standard Syntax

rotate(angle)



Browser Support

The numbers in the table specify the first browser version that fully supports the property.




Status







Function Arguments

The following table describes the arguments of this function.

Argument Description
angle Defines the rotation of the element.
  • A positive angle denotes a clockwise rotation.
  • A negative angle a counter-clockwise one.



See also

❮ Previous Functions Next ❯