jquery implementation of three-dimensional digital scroll bar added effect, the code is divided into two parts, part of the HTML structure of another part of the JS Code section, the need for friends to refer to the next bar!
1, HTML structure
<div class= "NumberRun1" ></div>
|
2, JS
<script type= "Text/javascript" src= "js/digital_over.js" ></script>//reference
This is a custom function (which needs to be called on the page)
Functiondigitalscroll (obj,n) {
Varnumrun = $ (obj). numberanimate ({num:n, speed:2000, Symbol: ","});
SetInterval (function () {
Varnumwidth= $ (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);
<!--This is the method that is invoked on the page-->
|
3. Picture Cases
Original link: http://www.cnblogs.com/wuxibolgs329/archive/2016/12/20/6204675.html