用canvas绘制圆环进度条–插件
简单写个可复用的绘制圆环进度条的插件,兼容移动端和pc端。
效果图如下:
使用方法:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#canvas{
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script src="circle-progress.js"></script>
<script>
circleProgress({
id: 'canvas',
width: '200',
per: 0.4,
lineWidth: 10,
text: '40%',
font: