亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

html5教程調(diào)用繪圖api畫簡(jiǎn)單的圓形代碼分享

  發(fā)布時(shí)間:2013-12-04 16:07:18   作者:佚名   我要評(píng)論
html5畫簡(jiǎn)單的圓形代碼分享,大家參考使用吧


復(fù)制代碼
代碼如下:

<!DOCTYPE html><head>
<meta charset=utf-8>
<title>HTML5畫圓形</title>
<script src="<a ></script</a>>
</head>
<script>
$(document).ready(function(){
var c=document.getElementById("drawbox");
var draw=c.getContext("2d"); //獲取2d內(nèi)容的引用,調(diào)用繪圖API</p> <p>draw.fillStyle="red"; //顏色
draw.beginPath(); //從新畫
draw.arc(50,50,50,0,Math.PI*2,true); //圓心x坐標(biāo)|圓心y坐標(biāo)|直徑|始|PI為圓周率,Math.PI*2為畫圓|true為時(shí)針?lè)较颍耗鏁r(shí)針,0為順時(shí)針,
draw.closePath(); //結(jié)束
draw.fill();
})
</script>
</body>
<canvas id="drawbox" width="500" height="500"></canvas>
</body>
</html>


效果圖

相關(guān)文章

最新評(píng)論