為什么我畫出來的??诤鹾醯模髅鱯tokestyle設(shè)置成“purple”
aneObj.prototype.draw = function() {
? ctx2.save();
? ctx2.globalAlpha = 0.6;
? ctx2.lineWidth = 20;
? ctx2.lineCap = "round";
? ctx2.stokeStyle = "purple";
for (var i = 0; i < this.num; i++) {
ctx2.beginPath();
ctx2.moveTo(this.x[i], canHeight)
ctx2.lineTo(this.x[i], canHeight - this.len[i])
ctx2.stroke();
};
ctx2.restore();
};
2018-03-13
已解決,謝謝哦!
2018-03-06
不好意思,ctx2.strokeStyle,剛我少寫了字母e
2018-03-06
ctx2.strokStyle, 注意你少寫了字母 r