7

I'd like to rotate an image on a webpage through four orientations at 90 degrees apart. I'd prefer this to happen on the client machines. Can this be done using css? Or will I need to use javascript?

Thank you for your time.

1
  • since it is 2013 now, check this answer, it just works Commented Apr 26, 2013 at 4:14

3 Answers 3

7

It is possible however only for new browsers.

Best Link I could find (Chrome / Safari / Firefox) with example

Sample source code (Safari/Chrome)

Sample source code (Firefox)

SO post containing code for IE Webkit and Firefox

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for the links. Some interesting effects here! At the moment though, it looks like I will have use javascript until browsers catch up.
5

You can do it in Firefox using these CSS transforms - as for other browsers, I think you'll need Javascript. I'd recommend you perhaps take a look at the Raphael library.

1 Comment

This looks like an excellent library and will save me a lot of work. Thank you for the link.
1

Afraid you're gonna have to use some javascript for that - CSS cannot do this currently

Try checking this out:

http://code.google.com/p/jquery-rotate/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.