首页 > 其他 > 详细

太极八卦图

时间:2018-12-10 20:16:44      阅读:161      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<canvas id="canvas" width="800px" height="800px"></canvas>
<script type="text/javascript">
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");

context.beginPath();
context.arc(200,200,200,0,2*Math.PI,false);
context.closePath();
context.stroke()

context.beginPath();
context.arc(200,200,200,0.5*Math.PI,1.5*Math.PI,false);
context.closePath();
context.fillStyle = "#000";
context.fill()

context.beginPath();
context.arc(200,100,100,0,1.5*Math.PI,false);
context.closePath();
context.fillStyle = "#fff";
context.fill()

context.beginPath();
context.arc(200,300,100,0.5*Math.PI,1.5*Math.PI,true);
context.closePath();
context.fillStyle = "#000";
context.fill()

context.beginPath();
context.arc(200,100,50,0,2*Math.PI,false);
context.closePath();
context.fillStyle = "#000";
context.fill()

context.beginPath();
context.arc(200,300,50,0,2*Math.PI,false);
context.closePath();
context.fillStyle = "#fff";
context.fill()

</script>
</body>
</html>

太极八卦图

原文:https://www.cnblogs.com/3542446186qq/p/10098581.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!