var now = moment(),
second = now.seconds() * 6,
minute = now.minutes() * 6 + second / 60,
hour = ((now.hours() % 12) / 12) * 360 + 90 + minute / 12;
$('#hour').css("transform", "rotate(" + hour + "deg)");
$('#minute').css("transform", "rotate(" + minute + "deg)");
$('#second').css("transform", "rotate(" + second + "deg)");
hour = ((now.hours() % 12) / 12) * 360 + 90 + minute / 12;
这个hour的角度,为什么要加上90度
子衿沉夜
慕盖茨4494581
相关分类