本文实例讲述了基于jquery数字滚动特效的代码,分为四种情况分享给大家供大家参考,具体如下:
- 有分隔符,有小数点:
- 只有分隔符:
- 只有小数点:
- 无分隔符,无小数点:
运行效果图:
具体代码如下
数字滚动插件 .mt-number-animate{ font-family: '微软雅黑'; line-height:40px; height: 40px;; font-size: 36px; overflow: hidden; display: inline-block; position: relative; } .mt-number-animate .mt-number-animate-dot{ width: 15px; line-height: 40px; float: left; text-align: center;} .mt-number-animate .mt-number-animate-dom{ width: 20px; text-align: center; float: left; position: relative; top: 0;} .mt-number-animate .mt-number-animate-dom .mt-number-animate-span{ width: 100%; float: left;}
有分隔符,有小数点:
只有分隔符:
只有小数点:
无分隔符,无小数点:
代码复制即可运行。
希望本文所述对大家Javascript程序设计有所帮助。



