rotate image with jquery compatible with IE7/8

2020-07-22 16:39发布

问题:

I have tried so many ways/plugins, and the one that attracts me the most is jquery.rotate

But, it doesn't work (at least for me) in Internet Explorer 7 and 8 (the images just disappear).

My objective is to hover images and make them animate their rotation, it works in Safari + Firefox but not IE.

Is there a way to achieve this and be compatible with most browsers and IE 7 and 8?

EDIT: In the end it turns out that both jQuery Rotate and Raphaël do work in IE 7 and 8! I didn't have a chance to test them on a real IE until today. I was testing both on IE Collection (http://utilu.com/IECollection/) and they definitely don't work in those emulated IEs, bummer!

回答1:

jqueryrotate works for me, but as an alternative..

Try cssSandpaper: http://www.useragentman.com/blog/csssandpaper-a-css3-javascript-library/

The most relevant demo I could find: http://www.useragentman.com/tests/cssSandpaper/countdown.html


As an aside: Raphaël works just fine in IE7/8, and is definitely capable of rotating an image.

Raphaël currently supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+.



回答2:

Raphael is a great library that works in IE (with VML) and other browsers (with SVG). It can rotate images and deal with transparency.

http://raphaeljs.com/

Internet Explorer 6, 7 & 8

http://www.deepbluesky.com/asx/ie8.jpg