特效描述:jQuery html5旋转 带指针转动 圆形时钟代码。圆形时钟代码
代码结构
1. 引入JS
2. HTML代码
var config = {
/*the name of the div containing the clock*/
divId: "html5-clock",
/*set to false if you don't want to use the second hand*/
useSecondHand: "true",
/*width and height of the clock*/
clockWidthAndHeight: "200",
/*location of the images*/
clockFaceImg: "images/bg/clockBg.png",
hourHandImg: "images/bg/hourHand.png",
minuteHandImg: "images/bg/minuteHand.png",
secondHandImg: "images/bg/secondHand.png",
/*location of the high res images for retina display*/
clockFaceHighResImg: "images/bg/clockBgHighRes.png",
hourHandHighResImg: "images/bg/hourHandHighRes.png",
minuteHandHighResImg: "images/bg/minuteHandHighRes.png",
secondHandHighResImg: "images/bg/secondHandHighRes.png",
/*Set true to make hand move at steady speed*/
smoothRotation: "false",
/*speed of the second hand. Lower is faster. */
/*Must be under 1000. */
/*If smooth rotation is true, this does nothing.*/
secondHandSpeed: "100"
};
var myhtml5Clock = new html5Clock(config);