zoukankan      html  css  js  c++  java
  • jQuery立体式数字滚动条增加

    1、html结构

    <div class="numberRun1"></div>

    2、js

    <script type="text/javascript" src="js/digital_over.js" ></script>//引用
    //这是自定义函数(需要在页面中进行调用)
    <script>
        //数字滚动
        function digitalScroll(obj,n){
            var numRun = $(obj).numberAnimate({num:n, speed:2000, symbol:","});
            var nums = n;
            setInterval(function(){
                numRun.resetData(nums);
            },3000);
            var numWidth= $(obj).width();
            $(obj).find('.mt-number-animate').css('width',numWidth);
            $(obj).css('width','100%');
            $(obj).find('.mt-number-animate').css('margin','0 auto');
        }
    
        window.indexdigitalScroll=function(){
            digitalScroll($('.numberRun1'),1160518);
        }
    </script>
    <!--这是在页面中调用的方法-->
    <script>
        $(function(){
            indexdigitalScroll();
            });
    </script>    

    3、图片案例

  • 相关阅读:
    牡牛和牝牛
    卡特兰数 Catalan number
    Codeforces Round #633 (Div. 2)
    Codeforces Round #634 (Div. 3)
    陪审团
    线性DP
    AcWing 274. 移动服务
    Rust打印方法行号
    八.枚举与模式匹配
    七.结构体
  • 原文地址:https://www.cnblogs.com/wuxibolgs329/p/6204675.html
Copyright © 2011-2022 走看看