npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

number-roll-animation

v1.0.3

Published

基于jquery的数字滚动效果,支持千位分号分隔符

Downloads

50

Readme

[ DEMO ] (http://desaiy.com/npm-demo/number-roll-animation/index.html)

![ 示例图 ] (http://desaiy.com/npm-demo/number-roll-animation/demo.png)

前言

基于jquery的数字滚动效果,支持千位分号分隔符。

使用方法

安装依赖:

npm install number-roll-animation --save

引用示例:

HTML示例:
    <div class="list"></div>
    

CSS示例:
    .list {
        height: 0.84rem;
        font-size: 0;
        letter-spacing: -5px;
        white-space: nowrap;
        margin: 0.3rem;
    }
    .list i {
        position: relative;
        display: inline-block;
        width: 0.62rem;
        height: 0.84rem;
        text-align: center;
        color: #e8cd92;
        font-size: 0.28rem;
        letter-spacing: 0;
        overflow: hidden;
        margin-right: 0.07rem;
    }
    .list span {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 8.4rem;
        background: url('../images/number.png') no-repeat;
        background-size: 100% 100%;
    }
    .list b {
        display: inline-block;
        font-size: 0.28rem;
        margin-right: 0.07rem;
    }


JS调用示例:
    numberRoll( selecotr, number, speed, hasComma );
    [selecotr] 必需。css选择器
    [number] 必需。数字或数字字符串
    [speed] 可选。默认1000毫秒滚动一次
    [hasComma] 可选。true表示需要添加分号分隔符

    例: numberRoll( '.list', 568945465, 1000, true );

更新历史:

  • 【2018-06-11】 v1.0.3 添加DEMO图片和链接。
  • 【2018-06-11】 v1.0.2 修改git仓库地址。
  • 【2018-06-05】 v1.0.1 基于jquery的数字滚动效果,支持千位分号分隔符。