1.html中用canvas标签
<canvas id="canvas" width="1920" height="200"></canvas>
宽高根据自己需要自己定义 适用于PC和H5
2.js部分
<script>
var canvas = document.getElementById('canvas');
var options = {
id: "canvas",
x: 20,
y: 60,
level: .5,
min: 70,
max: 90,
count: 10,
strokeColor: '#ffbbb2',
fillStyle: '#ffbbb2'
}
wave(options);
function wave(options) {
var c = document.getElementById(options.id),
ctx = c.getContext('2d'),
cw = c.width,
ch = c.height,
points = [],
tick = 0,
opt = {
count: options.count || 8,