只出現(xiàn)了一個(gè)小黑點(diǎn),在數(shù)字3那里
//繪制分鐘數(shù)
for(var i=0;i<60;i++){
?? ?var rad=2*Math.PI/60*i;
?? ?var x=Math.cos(rad)*(r-18);
?? ?var y=Math.sin(rad)*(r-18);
?? ?ctx.beginPath();?? ?
?? ?if( i % 5 === 0){
?? ?console.log(i);
?? ?ctx.arc(x,y,2,0,2*Math.PI,false);
?? ?}else{
?? ?ctx.fillStyle="#ccc";?? ?
?? ?ctx.arc(x,y,2,0,2*Math.PI,false);
?? ?}
?? ?ctx.fill();//填充路徑
}
2016-10-14
if( i % 5 == 0){
? cxt.fillStyle = '#000';
? cxt.arc(x,y,2* rem,0,2*Math.PI,false);
}