有什么区别context.fillText()和context.strokeText()除此之外的第一次使用的事实context.fillStyle,而后者的用途context.strokeStyle.他们没有添加context.textStyle房产的任何理由?
mar*_*rkE 17
是的,strokeText实际上描绘了字母的轮廓,而fillText填充了字母的内部.

ctx.fillStyle='red';
ctx.strokeStyle='green'
ctx.lineWidth=3;
ctx.font='90px verdana';
ctx.fillText('Q',50,150);
ctx.strokeText('Q',125,150);
ctx.fillText('Q',200,150);
ctx.strokeText('Q',200,150);
Run Code Online (Sandbox Code Playgroud)