jQuery Progress Bar Plugin NUMBERPROGRESSBAR

Add-ons
2026-07-25 23:36 4 次浏览 • 0 次下载 41.6KB
jQuery Progress Bar Plugin NUMBERPROGRESSBAR

Installation

1
bower install NumberProgressBar [--save]

Usage

HTML

1
2
3
4
<div class="number-pb">
<div class="number-pb-shown"></div>
<div class="number-pb-num">0%</div>
</div>


CSS

You can refer to the number-pb.css file and customize it to suit your needs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.number-pb {
position: relative;
height: 3px;
background-color: #ddd;
}
.number-pb .number-pb-shown {
position: absolute;
background-color: #176785;
background-image: linear-gradient(to right, #176785, #499989);
top: -1px;
left: 0;
height: 5px;
-moz-box-shadow: 0 0 3px 0 #499989;
-webkit-box-shadow: 0 0 3px 0 #499989;
box-shadow: 0 0 3px 0 #499989;
}
.number-pb .number-pb-num {
position: absolute;
background-color: #fff;
left: 0;
top: -0.45em;
padding: 0 5px;
}


javaScript

1
2
var bars = $('.number-pb').NumberProgressBar(options);
bars.reach(num); // num is the percentage you want to achieve


Settings


OptionsDefaultUsage

duration10000Duration (in milliseconds) required to go from 0 to 100

percentage0Initial percentage

shownQuery'.number-pb-shown'Query string for the displayed bar

numQuery'.number-pb-num'Query string for the number


星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare