zoukankan      html  css  js  c++  java
  • SVG绘制太极图

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

    源代码:

    <!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>
  • 相关阅读:
    ajax
    导入操作
    游标的使用
    多行编辑
    IOS开发之--NSPredicate
    asp.net DataTables
    asp.net 汉字转拼音的车祸现场
    Git 连接细节
    Aspose.Words 操作指北
    码云代码管理插件备忘
  • 原文地址:https://www.cnblogs.com/MrZWJ/p/10052210.html
Copyright © 2011-2022 走看看