axmed2004 Asked:2020-04-04 20:07:10 +0800 CST2020-04-04 20:07:10 +0800 CST 2020-04-04 20:07:10 +0800 CST js画布绘制特殊字符 772 您需要在画布上显示特殊字符 alpha (α) ctx.fillText("α",50,195); 输出相同的文本α 如何绘制特殊字符? javascript 1 个回答 Voted Best Answer Denis640Kb 2020-04-04T21:04:28+08:002020-04-04T21:04:28+08:00 您可以使用直接符号来插入值: var canvas = document.getElementById('canvas'); if (canvas.getContext) { var ctx = canvas.getContext('2d'); ctx.fillRect(25,25,100,100); ctx.clearRect(45,45,60,60); ctx.strokeRect(50,50,50,50); ctx.fillText("α®™¾Ω;",55,75); } <canvas id="canvas"> </canvas>
您可以使用直接符号来插入值: