canvas八卦图1
来源:互联网 发布:java轻量级web框架 编辑:程序博客网 时间:2024/06/05 00:30
<!DOCTYPE html>
<html>
<head>
<metacharset="UTF-8">
<title></title>
</head>
<body>
<canvasid="canvas" width="500" height="500"></canvas>
<scripttype="text/javascript">
varcanvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.translate(250,250);
setInterval(function() {
ctx.clearRect(0,0, canvas.width, canvas.height);
ctx.rotate(Math.PI/ -180);
// 大圆
ctx.beginPath();
ctx.arc(0,0, 200, 0, Math.PI* 2, false);
ctx.stroke();
// 大黑半圆
ctx.beginPath();
ctx.fillStyle = "black";
ctx.arc(0,0, 200, Math.PI / 2, Math.PI * 3 / 2, false);
ctx.fill();
ctx.stroke();
// 中白圆
ctx.beginPath();
ctx.strokeStyle= "white";
ctx.fillStyle = "white";
ctx.arc(0,-100, 100,0, Math.PI * 2,false);
ctx.fill();
ctx.stroke();
// 中黑圆
ctx.beginPath();
ctx.strokeStyle= "black";
ctx.fillStyle = "black";
ctx.arc(0,100, 100, 0, Math.PI* 2, false);
ctx.fill();
ctx.stroke();
// 小黑圆
ctx.beginPath();
ctx.fillStyle = "black";
ctx.arc(0,-100, 30,0, Math.PI * 2,false);
ctx.fill();
ctx.stroke();
// 小白圆
ctx.beginPath();
ctx.fillStyle = "white";
ctx.arc(0,100, 30, 0, Math.PI* 2, false);
ctx.fill();
ctx.stroke();
}, 20)
</script>
</body>
</html>
- canvas八卦图1
- canvas八卦图2
- canvas绘制八卦图
- canvas 绘制八卦图
- Html5 Canvas 系列_绘图三(H5 ,CSS3 动态八卦图)
- 算法生成太极八卦图
- css画八卦图
- 运动的八卦图
- 太极八卦图实现
- 自定义View画八卦图
- Android 自定义view 八卦图
- 动态八卦图在手机中
- ps 太极八卦图的制作
- c语言画的八卦图
- [Canvas]1-1Hello canvas
- 利用形状图层绘制八卦图
- 用CSS实现阴阳八卦图等图形
- Android自定义View实现八卦图效果
- 从零基础接触java第二周第二节
- CSRF 跨Session攻击
- #164 Unique Binary Search Trees II
- canvas版时钟
- Codeforces #366(Div.2) C. Thor【思维】
- canvas八卦图1
- Hibernate一级缓存
- 暑假留校--第三周总结
- Codeforces Round #366 (Div. 2)
- canvas八卦图2
- 数据结构 [未完成 待续~待修改]
- canvas放大镜
- Android 手动显示和隐藏软键盘
- 自定义画圆与直线