Search w3schools.com:

SHARE THIS PAGE

CSS Reference

CSS Reference CSS Selectors CSS Reference Aural CSS Web Safe Fonts CSS Units CSS Colors CSS Color Values CSS Color Names CSS Color HEX CSS3 Browser Support

CSS Properties

CSS3 rotation Property


Example

Rotate h1 elements 180 degrees (upside down):

h1
{
rotation-point:50% 50%;
rotation:180deg;
}

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The rotation property is not supported in any of the major browsers.


Definition and Usage

The rotation property rotates a block-level element counterclockwise around a given point defined by the rotation-point property.

Tip: The border, padding, content, and backgrounds (that are not fixed) are also rotated!

Default value: 0
Inherited: no
Version: CSS3
JavaScript syntax: object.style.rotation="180deg"


Syntax

rotation: angle;

Value Description
angle The rotation of the element. Possible values: 0deg to 360deg



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]