代码如下:
<!DOCTYPE html>
<html>
<head>
<script>
var drawing = function(){
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
//画个阴阳鱼
ctx.beginPath();
ctx.arc(100,100,90,-90*Math.PI/180,90*Math.PI/180,true);
ctx.fillStyle = "black";
ctx.fill();
ctx.beginPath();
ctx.arc(100,100,90,90*Math.PI/180,-90*Math.PI/180,true);
ctx.stroke();
ctx.beginPath();
ctx.arc(100,55,44,-90*Math.PI/180,90*Math.PI/180,true);
ctx.fillStyle = "white";
ctx.fill();
ctx.beginPath();
ctx.arc(100,55,11,0,360*Math