已采纳回答 / qq_SuperBigMixE_0342
offsetLeft获取的时到定位父级的左边的距离,在不确定定位父级的状态下,不好使用,例如,在canvas外面套一个div,那么offsetLeft获取的时canvas左边到div左边的距离了,并不是到浏览器左边的距离了
2016-10-08
已采纳回答 / 狐小鱼
context.drawImage(img,0,0,60,60)}改成context.drawImage(img,0,0,imageWidth,imageHeight)
2016-08-08
已采纳回答 / yansen945
context.drawImage( image , sx , sy , canvas.width , canvas.height , 0 , 0 , canvas.width , canvas.height );这句改成context.drawImage( image , sx , sy , canvas.width , canvas.height , sx , sy , canvas.width , canvas.height );
2016-04-28