案例:html案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE HTML>
2
<html>
3
<body>
4
5
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
6
Your browser does not support the canvas element.
7
</canvas>
8
9
<script type="text/javascript">
10
11
var c=document.getElementById("myCanvas");
12
var cxt=c.getContext("2d");
13
cxt.fillStyle="#0000FF";
14
cxt.beginPath();
15
cxt.arc(70,18,15,0,Math.PI*2,true);
16
cxt.closePath();
17
cxt.fill();
18
19
</script>
20
21
</body>
22
</html>