扫一扫分享
nanobar.js是一款轻量级的纯js进度条插件。这款进度条插件兼容ie8浏览器,它使用简单,并提供一些方法来控制进度条的当前进度。
安装nanobar.js
bower install nanobar
//or
npm install nanobar
js代码
<script type="text/javascript" src="js/nanobar.js"></script>
<script type="text/javascript">
var simplebar = new Nanobar();
simplebar.go(50);
var colorbar = new Nanobar({target: document.getElementById('color')});
colorbar.go(50);
var centeredbar = new Nanobar({target: document.getElementById('centered')});
centeredbar.go(50);
</script>
手机预览