Skip to content

Instantly share code, notes, and snippets.

@magemore
Created April 25, 2012 05:01
Show Gist options
  • Save magemore/2486596 to your computer and use it in GitHub Desktop.
Save magemore/2486596 to your computer and use it in GitHub Desktop.
Rotating an image or text – transform
/* for firefox, safari, chrome, and any other gecko/webkit browser */
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
/* for ie */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
/* opera */
-o-transform: rotate(30deg);
@magemore
Copy link
Author

Rotate any image, text, or technically any element using this. Change the rotate value to how many degrees you want it to rotate, adding a “-” (like in the snippet) for counterclockwise rotating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment