020406080100120140160

下载速度

87.3

Mbps

        //获取画布canvas的dom对象

          let canvas=document.createElement("canvas");
          let draw=canvas.getContext('2d');

         //时刻度  长
          for(var i=0;i< 12;i++){ 
             draw.save();
             draw.lineWidth=4;
             draw.strokeStyle="white" ;
             draw.translate(250,250);
             draw.rotate(i*30*Math.PI/180);
	         draw.beginPath();
	         draw.moveTo(0,170);
	         draw.lineTo(0,190);
	         draw.closePath();
	         draw.stroke();
	         draw.restore();
          }
          //分刻度  短
          for(let i=0;i< 60;i++){ 
              draw.save();
              draw.translate(250,250);
              draw.rotate(i*6*Math.PI/180);
	          draw.lineWidth=2;
	          draw.strokeStyle="white";
	          draw.beginPath();
	          draw.moveTo(0,190);
	          draw.lineTo(0,180);
	          draw.closePath();
	          draw.stroke();
	          draw.restore();
          }