关于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();
});发布于 2013-03-04 05:07:33
是的,IE9支持CSS转换。您只需添加-ms-前缀。
有关更多信息,请参阅CanIUse website。
然而,它不支持转换,我在问题中的CSS代码中看到了这一点。如果您需要在IE9 (或更早版本)中支持CSS转换,您可以使用CSS Sandpaper polyfill库。
https://stackoverflow.com/questions/15190869
复制相似问题