为什么我的图像还是模糊状态的
var canvasWidth=800;
var canvasHeight=600;
var canvas=document.getElementById("canvas");
var context=canvas.getContext("2d");
canvas.width=canvasWidth;
canvas.height=canvasHeight;
var image=new Image();
image.src="image.jpg";
image.onload=function(e){
initCanvas();
}
function initCanvas(){
draw(image);
}
function draw(image){
context.drawImage(image,0,0);
}
应该是没有设置canvas的层级,z-index要比图片的层级高