jsfiddle の例 http://jsfiddle.net/chrisloughnane/T9N3h/
この例は Opera、Chrome、Firefox では正常に動作しますが、IE の変換が見つかりません。
また、Firefox では、多くの変換があるとすべてのアニメーションが停止します。
http://toys.chrisloughnane.net/
これにアプローチするより良い方法はありますか?ティア。
HTML
<div class="display"></div>
CSS
.display {
background-image: url("http://toys.chrisloughnane.net/images/darkhand-small-50.png");
height: 25px;
width: 25px;
-webkit-transition:all 400ms;
-moz-transition:all 400ms;
-o-transition:all 400ms;
transition:all 400ms;
position: absolute;
top: 200px;
left: 200px;
}
JavaScript
$(document).ready(function() {
function getRandom(min, max) {
return min + Math.floor(Math.random() * (max - min + 1));
}
function go() {
var iCSS = ("rotate(" + getRandom(0, 359) + "deg)");
$(".display").css({
'-moz-transform': iCSS,
'-o-transform': iCSS,
'-webkit-transform': iCSS
});
setTimeout(go, 600);
}
go();
});