在canvas标签中,如果你用css给canvas设置宽度和高度时,是无效的,所以你必须用行内样式去设置canvas的长和宽 转载于:https://www.cnblogs.com/smallfishzzy/p/7275335.html