Rotating an image using css

2019-06-18 04:26发布

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.

3条回答
叼着烟拽天下
2楼-- · 2019-06-18 04:43

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.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-06-18 04:44

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/

查看更多
登录 后发表回答