user1741969
user1741969

Reputation: 21

Why images don't rotate through CSS parameters in IE 9?

I use this function to rotate images:

  xrotate: function (object, degrees) {
      object.css({
    '-webkit-transform' : 'rotate('+degrees+'deg)',
       '-moz-transform' : 'rotate('+degrees+'deg)',
        '-ms-transform' : 'rotate('+degrees+'deg)',
         '-o-transform' : 'rotate('+degrees+'deg)',
            'transform' : 'rotate('+degrees+'deg)',
                 'zoom' : 1
      });
  }

It works in chrome, firefox, opera, safari, but not in IE9. Why doesn't it?

This style doesn't appear in DOM viewer HTML/Trace Styles screen for this image at all. And it looks like, unlike in chrome, it is impossible to add it there by hand in DOM viewer in IE.

PS: Image is gif 12x12. Before, when I tried the same with same svg image, it didn't show at all, even though it is supposed to be supported in IE.

Upvotes: 2

Views: 196

Answers (1)

Trott
Trott

Reputation: 70125

IE9 supports transforms if they are ms- prefixed, but IE8 and earlier do not. Since you have the ms- prefixed version in your code, a likely explanation is that you are looking at the site in Compatibility Mode.

Upvotes: 2

Related Questions