先下载插件npm install --save number-flip

<script src="./number-flip.min.js"></script>
<div id="demo"></div>
<script>
var demo = new Flip({
node: document.getElementById("demo"),
from: 0, //开始的数
to: 186, //结束的数
duration: 0.5, //过度时间
delay: 1 //等待时间
});
</script>