数字平滑 前端插件JS&CSS库

时间:2024-01-13 21:10:26

CDN DEMO 拷贝可用;

<!DOCTYPE html>
<link rel="stylesheet" href="https://cdn.bootcss.com/odometer.js/0.4.8/themes/odometer-theme-car.css" />
<style>
.odometer {
font-size: 40px;
}
</style>
<script>
window.odometerOptions = {
format: '(ddd).dd'
};
</script> <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/odometer.js/0.4.8/odometer.min.js"></script>
<div class="odometer">99999999</div> <script>
setInterval(function(){
let data = Math.random() * 100000000
$('.odometer').html(data);
}, 3000);
</script>

结果如下:

数字平滑 前端插件JS&CSS库

数字平滑 前端插件JS&CSS库

GITHUB