<!DOCTYPE?html>
<html>
<head>
<meta?charset="utf-8">
<title></title>
</head>
<script>
function?arcv(){
var?can?=?document.getElementById("can");
if(can?==?null){
return?false;
}
var?getCon?=?can.getContext("2d");
getCon.fillStyle?=?"#eeeeef";
getCon.fillRect(0,0,600,600);
for(var?i=?0;?i?<=?8;?i++){
getCon.beginPath();
getCon.arc(100,80,i*8,0,2*Math.PI);
getCon.closePath();
getCon.fillStyle?=?"rgba(255,0,0,0.25)";
getCon.fill();
}
}
</script>
<body?onload="arcv()">
<canvas?id="can"?style="width:?600px;?height:600px;"></canvas>
</body>
</html>出來(lái)就是這種了,幫我看看吧?
html5中canvas的畫圓,我的總是是一個(gè)橢圓,求大神解決下?
續(xù)寫不盡的未來(lái)3319689
2016-11-22 14:45:18