首页 > 其他 > 详细

SVG绘制太极图

时间:2018-12-02 11:56:51      阅读:227      评论:0      收藏:0      [点我收藏+]

思路:先画一整个圆,填充颜色为黑色,再用一个边框和填充颜色均为白色的长方形覆盖右半边的半圆,再以同一个圆心,相同半径绘制一整个圆,该圆的边线颜色为黑色,没有填充颜色,最后常规操作再画四个小圆

源代码:

<!doctype html>
<html>
<head>
<title>test</title>
<meta charset="UTF-8">
</head>
<body>
<svg id="svg" width=600px height=600px >
<circle cx="100" cy="100" r="100" fill="black" stroke="black"></circle>
<polygon points="100,0 200,0 200,200 100,200 100,0" stroke="white" fill="white"></polygon>
<circle cx="100" cy="100" r="100" fill="none" id="circle2" stroke="black"></circle>
<circle cx="100" cy="50" r="50" fill="white" stroke="none"></circle>
<circle cx="100" cy="150" r="50" fill="black" stroke="none"></circle>
<circle cx="100" cy="50" r="20" fill="black" stroke="black"></circle>
<circle cx="100" cy="150" r="20" fill="white" stroke="black"></circle>
</svg>

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

SVG绘制太极图

原文:https://www.cnblogs.com/MrZWJ/p/10052210.html

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