TypechoJoeTheme

Dcr163的博客

统计

数字更改更换特效

2020-12-02
/
0 评论
/
2,105 阅读
/
正在检测是否收录...
12/02

运行效果如下图所示:

源码如下:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>数字更改特效</title>
</head>
<body>
<div>
<p>网站运行:<span>5000</span> 天</p>
<p>文章数量:<span>1500</span> 篇</p>
<p>访客数量:<span>10666</span> 次</p>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script>
        $(document).ready(function(){
             $('.numberCount').each(function(){
                 $(this).prop('Counter',0).animate({
                         Counter: $(this).text(),
                     },{
                         duration: 2500,
                         easing: 'swing',
                         step: function (now){
                         $(this).text(Math.ceil(now));
                     }
                 });
             });
        });
    </script>
</body>
</html>


朗读
赞(0)
版权属于:

Dcr163的博客

本文链接:

http://dcr163.cn/260.html(转载时请注明本文出处及文章链接)

评论 (0)

人生倒计时

今日已经过去小时
这周已经过去天
本月已经过去天
今年已经过去个月

最新回复

  1. blowjob
    2026-07-19
  2. バイナリー 取引ツール
    2026-07-11
  3. http://www.annunciogratis.net/author/oevsandra54
    2026-05-31
  4. web page
    2026-04-10
  5. plenty of insightful
    2026-03-19

标签云