<canvas width="500" height="500" id="mycanvas4"></canvas>
let canvas = document.getElementById('mycanvas4')
if (canvas.getContext) {
let ctx = canvas.getContext('2d')
ctx.beginPath()
ctx.moveTo(100, 100)
ctx.quadraticCurveTo(150, 150, 100, 200)
ctx.stroke()
} else {
console.log('浏览器不支持canvas')
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.