独角兽企业重金招聘Python工程师标准>>>
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>楼梯</title><style>canvas{/*border:1px solid red;*/}</style><script>window.onload = function(){var canvas = document.getElementById('canvas');var context = canvas.getContext('2d');// 开始绘制楼梯,直线绘制context.beginPath();context.moveTo(0,0);context.lineTo(100,0);context.lineTo(100,100);context.lineTo(200,100);context.lineTo(200,200);context.lineTo(300,200);context.lineTo(300,300);context.lineTo(400,300);context.lineTo(400,400);context.closePath();context.strokeStyle = 'pink';context.fillStyle = 'skyblue';context.lineWidth = 3;context.stroke();// context.fill();}</script></head><body><canvas id="canvas" width="400px" height="400px"></canvas></body></html>