HTML5 SVG轻量级jQuery进度条插件

所属分类:UI-加载

 26380  325  查看评论 (0)
分享到微信朋友圈
X
HTML5 SVG轻量级jQuery进度条插件 ie兼容10

简要教程

这是一款基于HTML5 SVG的轻量级jQuery进度条插件。该进度条插件使用简单,它提供了一些基本的参数来控制进度条的外观和动画,是一款非常实用的进度条插件。

使用方法

使用该jQuery进度条插件需要引入jQuery和jquery.progress.js文件。

<script src="js/jquery.min.js"></script> 
<script src="js/jquery.progress.js"></script>

HTML结构

该jQuery进度条的HTML结构使用一个<svg>元素来制作。

<svg id="container"></svg>

初始化插件

在页面DOM元素加载完毕之后,可以通过下面的方法来初始化该进度条插件。

var progress = $("#container").Progress({
  percent: 20,
  width: 180,
  height: 40,
  fontSize: 16
});

配置参数

该进度条插件的可用配置参数如下:

var settings = {
  width: 90, // the width of bar
  height: 20, // the height of bar
  percent: 0, // the current percent
  backgroundColor: '#555', // the color of the background
  barColor: '#d9534f', // the color of the bar
  radius: 4, // the radius of the corner
  fontSize: 12, // the font size
  fontColor: '#fff', // the color of the number
  increaseSpeed: 1, // the increase length
  animate: true // whether to use animation
};
  • width:进度条的宽度。

  • height:进度条的高度。

  • percent:进度条的当前百分比。

  • backgroundColor:进度条的背景色。

  • barColor:进度条的颜色。

  • radius:进度条圆角的半径。

  • fontSize:字体大小。

  • fontColor:字体颜色。

  • increaseSpeed:进度条增加的长度。

  • animate:是否动画。


相关插件-加载

JQueryCanvas环形进度条(原创)

JQueryCanvas环形进度条插件
  加载
 30771  327

HTML5手机端手指滑动上拉加载

jQuery HTML5手机端手指滑动上拉加载代码是一款通过jquery实现tab切换和上拉加载更多的效果,适用于手机端页面开发。
  加载
 54370  582

jQuery进度条插件jqbar

柱状图动态显示工具
  加载
 45872  360

jquery实现图片预加载

jquery实现图片预加载
  加载
 49179  446

讨论这个项目(0)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复