HTML5+Canvas微信运动折线图

 时间:2026-02-14 20:50:07

1、新建html文档。

HTML5+Canvas微信运动折线图

2、准备好需要用到的图标。

HTML5+Canvas微信运动折线图

3、书写hmtl代码。

<div class="circles">

<div class="circle">

<canvas id='wcMotion' style="width:912px; height:515px; margin: 0 26px; -webkit-tap-highlight-color: rgba(0,0,0,0);"></canvas>

</div>

</div>

HTML5+Canvas微信运动折线图

4、书写css代码。

.circle { width: 915px; height: 520px; margin: 50px auto; }

html, body { width : 100%; height : 100%; margin : 0; padding : 0; }

.wrapper { position : relative; width : 420px; margin : 0 auto; padding : 0; font-size : 0; }

.icon { position : relative; display : inline-block; width : 100px; height : 100px; margin : 20px; border-radius : 18px; -webkit-box-sizing : border-box; -moz-box-sizing : border-box; box-sizing : border-box; }

HTML5+Canvas微信运动折线图

5、书写并添加js代码。

<script src="js/jquery-2.1.1.min.js"></script>

<script src="dist/wc-motion-chart.js"></script>

<script src="js/example.js"></script>

HTML5+Canvas微信运动折线图

6、代码整体结构。

HTML5+Canvas微信运动折线图

7、查看效果。

HTML5+Canvas微信运动折线图

  • 计划生育手术并发症鉴定程序
  • while 和 do while 区别
  • 《春天的故事》歌词
  • 巴乐兔租房如何注销账号
  • HelloTalk怎么设置不显示地区定位信息
  • 热门搜索
    防溺水手抄报大全图片 文明礼仪手抄报图片 保护环境的手抄报 禁毒手抄报简单又漂亮 争做新时代好少年手抄报 预防溺水手抄报 童心向党手抄报 关于读书的手抄报内容 四年级数学手抄报 历史手抄报