1
我想使用jQuery的動畫轉換爲時鐘。但它不工作.. 我寫這樣的代碼:與jQuery轉換不起作用
var now = new Date();
var hr = now.getHours();
var min = now.getMinutes();
var sec = now.getSeconds();
hr = hr % 12;
hr = hr * 30;
$('#hour').animate({
step: function (hr) {
$(this).css('-webkit-transform', 'rotate(' + hr + 'deg)');
},
duration: 10
}, 'linear');
的更多信息,請參閱我的JSFiddle