第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

代碼
提交代碼
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>慕課網(wǎng)Wiki</title> <style> #imooc{ border:1px solid #ccc; } </style> </head> <body> <canvas id="imooc">您的瀏覽器不支持 HTML5 canvas 標(biāo)簽</canvas> <script> const canvas = document.getElementById('imooc'); canvas.width=300 canvas.height=100 const ctx = canvas.getContext('2d'); strokeDottedLine(); strokeGridding(ctx); // 繪制虛線 function strokeDottedLine(){ ctx.beginPath(); ctx.setLineDash([10,20,30]) // 設(shè)置虛線 ctx.strokeStyle="#456795" ctx.lineWidth=10; ctx.moveTo(0,45); ctx.lineTo(300,45); ctx.stroke(); } // 繪制網(wǎng)格 function strokeGridding(){ ctx.lineWidth=1; ctx.strokeStyle="#ccc"; ctx.setLineDash([]) // 這里必須再設(shè)置回默認(rèn)狀態(tài) for(let i=0; i<300; i+=10){ ctx.beginPath(); ctx.moveTo(i, 0); ctx.lineTo(i, 300); ctx.stroke(); ctx.beginPath(); ctx.moveTo(0,i); ctx.lineTo(300, i); ctx.stroke(); } } </script> <body> </html>
運(yùn)行結(jié)果