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
http://modernizr.com/download/
Modernizr should do the trick.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.