【发布时间】:2021-04-29 09:42:07
【问题描述】:
【问题讨论】:
-
.stroke不会填写;为此使用.fill
标签: javascript reactjs html5-canvas
【问题讨论】:
.stroke 不会填写;为此使用.fill
标签: javascript reactjs html5-canvas
在填充样式之后,您需要添加一个新行,代码如下。
ctx.fillStyle = 'green';
ctx.fillRect(200, 100, 200, 200);
【讨论】: