亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    canvas繪制奧運(yùn)五環(huán)代碼分享

    運(yùn)行效果:

    canvas繪制奧運(yùn)五環(huán)代碼分享

    <!DOCTYPE html>  <html>  <head>  </head>  <body>  <canvas id="drawing" width="800" height="600">A drawing of someing!</canvas>      <script type="text/javascript">var drawing = document.getElementById('drawing');if(drawing.getContext) {//繪制奧運(yùn)五環(huán),畫圓var context = drawing.getContext('2d');              context.lineWidth = 7;              context.strokeStyle = '#0180C3';              context.beginPath();              context.arc(70, 70, 40, 0, 2*Math.PI, false);              context.stroke();              context.strokeStyle = '#000';              context.beginPath();              context.arc(160, 70, 40, 0, 2*Math.PI, false);              context.stroke();              context.strokeStyle = '#BF0628';              context.beginPath();              context.arc(250, 70, 40, 0, 2*Math.PI, false);              context.stroke();              context.strokeStyle = '#EBC41F';              context.beginPath();              context.arc(115, 110, 40, 0, 2*Math.PI, false);              context.stroke();              context.strokeStyle = '#198E4A';              context.beginPath();              context.arc(205, 110, 40, 0, 2*Math.PI, false);              context.stroke();//環(huán)環(huán)相扣,畫弧(實(shí)現(xiàn)相關(guān)圓弧的覆蓋)context.strokeStyle = '#0180C3';              context.beginPath();              context.arc(70, 70, 40, 1.9*Math.PI, 2.1*Math.PI, false);              context.stroke();              context.strokeStyle = '#000';              context.beginPath();              context.arc(160, 70, 40, 1.9*Math.PI, 2.1*Math.PI, false);              context.stroke();              context.beginPath();              context.arc(160, 70, 40, 0.5*Math.PI, 0.7*Math.PI, false);              context.stroke();              context.strokeStyle = '#BF0628';              context.beginPath();              context.arc(250, 70, 40, 0.5*Math.PI, 0.7*Math.PI, false);              context.stroke();          }</script>  </body>  </html>

    贊(1)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號