久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      HTML5 canvas學(xué)習(xí)的實(shí)例介紹

      1.HTML5中的Canvas標(biāo)簽的創(chuàng)建

      window.onload = function(){    createCanvas();   }  function createCanvas(){   var canvas_width= 200, canvas_height = 200;     document.body.innerHTML = "<canvas id="canvas" width=""+canvas_width+"" height=""+canvas_height+""></canvas>";    }

      2.HTML5Canvas標(biāo)簽繪制圖形

      var canvas_width= 500, canvas_height = 500;var mycanvas, context;    window.onload = function(){    createCanvas();    drawRect();   }  function createCanvas(){          document.body.innerHTML = "<canvas id="mycanvas" width=""+canvas_width+"" height=""+canvas_height+""></canvas>";     mycanvas = document.getElementById("mycanvas");     context = mycanvas.getContext("2d");    }     function drawRect(){   context.fillStyle ="#FF0000"; //context.rotate(45);//旋轉(zhuǎn)45度   //context.translate(200,200);//移動(dòng)   //context.scale(2,0.5);//縮放   context.fillRect(0,0,200,200);    }

      3.HTML5Canvas標(biāo)簽繪制圖片

      var canvas_width= 500, canvas_height = 500;var mycanvas, context;    window.onload = function(){    createCanvas();    drawImage();   }  function createCanvas(){          document.body.innerHTML = "<canvas id="mycanvas" width=""+canvas_width+"" height=""+canvas_height+""></canvas>";     mycanvas = document.getElementById("mycanvas");     context = mycanvas.getContext("2d");    }     function drawImage(){ var img = new Image();   img.onload = function(){    context.drawImage(img,0,0);   }   img.src = "1.png";    }

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