css3 rotation doesn't work in IE9

2019-08-23 01:55发布

This code allows me to slowly rotate images whenever the mouse is over one of them.

 .foo img {
     -webkit-transition: all 0.5s ease;
     -moz-transition: all 0.5s ease;
       -o-transition: all 0.5s ease;
      -ms-transition: all 0.5s ease;
          transition: all 0.5s ease;
    }
     .foo img:hover {
      -webkit-transform: rotate(-10deg);
     -moz-transform: rotate(-10deg);
      -o-transform: rotate(-10deg);
      -ms-transform: rotate(-10deg);
          transform: rotate(-10deg);
    }

It works in FF18 and Opera. However, I can't get it to work on IE9, even is -ms-transform should be the proper solution. IE9 acts as if there's no specific css img:hover rule. Any hints? thanks

1条回答
走好不送
2楼-- · 2019-08-23 02:32

http://modernizr.com/download/

Modernizr should do the trick.

查看更多
登录 后发表回答