I have a <div> that I want to rotate 90 degrees:
<div id="container_2"></div>
How can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need CSS to achieve this, e.g.:
Demo:
(There’s 45 degrees rotation in the demo, so you can see the effect)
Note: The
-o-and-moz-prefixes are no longer relevant and probably not required. IE9 requires-ms-and Safari and the Android browser require-webkit-Update 2018: Vendor prefixes are not needed anymore. Only
transformis sufficient. (thanks @rinogo)