好纠结这个问题。fillText显示不出来
window.onload=function(){ var canvas=document.getElementById("canvas"); canvas.width=800; canvas.height=800; var context=canvas.getContext("2d"); context.font="bold 40px Arial"; context.fillStyle="#058"; context.fillText=("快乐学习,快乐进步!",40,100); context.lineWidth=1; context.strokeStyle="#058"; //context.strokeText("快乐学习,快乐进步",40,100); context.fillText=("快乐学习,快乐进步",40,300,400); //context.strokeText("快乐学习,快乐进步",40,400,400); }
这样写就看不到文本了