#myCanvas
textBaseline
'alphabetic'|'bottom'|'hanging'|'ideographic'|'middle'|'top'
ctx.moveTo(5,50); ctx.lineTo(200,50); ctx.stroke(); ctx.textBaseline=#val; ctx.font='30px Arial'; ctx.fillText('Hello World',20,50);
your browser does not support the canvas tag
Canvas
❮
Previous
Next
❯
观看不同值的演示
.
或者点击指定值查看结果
在编辑器中更多地使用代码:
亲自尝试一下 ❯