美文网首页数据可视化前端
【前端数据可视化】SVG

【前端数据可视化】SVG

作者: itlu | 来源:发表于2020-10-31 16:41 被阅读0次

1. svg入门

示例图片
  1. 示例代码 :
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"
        ,maximum-scale=1.0,minimum-scale=1.0>
  <title>svg入门案例</title>
</head>
<body>

<svg width="1000" height="1000">
  <rect height="50" width="50" style="fill:red;stroke-width: 0;stroke: rgb(0,0,0)"></rect>
  <!-- 两点一线 -->
  <line x1="100" y1="100" x2="300" y2="200" style="stroke:blue;stroke-width: 3;"></line>
  <line x1="300" y1="200" x2="150" y2="500" style="stroke:#0000ff;stroke-width: 3;"></line>
  <circle cx="366" cy="366" r="50" stroke="#eeaa45" stroke-width="1" fill="#0fa400"></circle>
</svg>

</body>
</html>
  1. 参考网址 : SVG 菜鸟教程svg教程w3cschool

相关文章

网友评论

    本文标题:【前端数据可视化】SVG

    本文链接:https://www.haomeiwen.com/subject/riisvktx.html