天正在等烟雨,而我在等你,啦啦啦,欢迎关注我的简书,今天分享的是原创的canvas仿写贝塞尔曲线方法。具体如下:
效果图:
html
<canvas id=mycanvas width=500 height=500>您的浏览器不支持canvas</canvas>
css
canvas{ border: 1px solid black;}
js
var canvas = document.getElementById(mycanvas);
var context = canvas.getContext(2d);
var x1 = 100