qq_遺忘的激情_0
2016-10-12 11:22
请问我第二个圆的填充色怎么显示不出来,代码是哪里出错了,谢谢
window.onload = function(){
var canvas = document.getElementById("cnavas");
var cxt = canvas.getContext('2d');
canvas.width =440;
canvas.height =90;
cxt.strokeStyle = "#ecebeb";
cxt.moveTo(40,42);
cxt.lineTo(220,42);
cxt.lineWidth = 5;
cxt.stroke();
cxt.beginPath();
cxt.fillstyle = "blue";
cxt.arc(45, 45, 25, 0, 2*Math.PI, false);
cxt.fill();
cxt.closePath();
}
fillStyle 的 S要大写。
Canvas绘图详解
72881 学习 · 422 问题
相似问题