你好 ,
我希望我的舞台如下图所示,并且用户将在其上绘图,我的问题是如何使用 React-Konva 做到这一点?我只在矩形中看到了cornerRadius属性。用户的操作也应该在舞台上进行。
提前致谢
您可以使用 CSS 样式来做到这一点:
<Stage width={window.innerWidth} height={window.innerHeight} style={{
backgroundColor: 'grey',
borderRadius: '15px',
overflow: 'hidden'
}}>
Run Code Online (Sandbox Code Playgroud)
https://codesandbox.io/s/98on17x8xr