功能:
1.可对进度条进行设置,
2.可滑动进度条,
4.可设置进度条名
5.可修改其颜色.
插件效果图如下:
Html代码如下:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="bar3.js"></script>
<link rel="stylesheet" type="text/css" href="bar.css">
</head>
<body>
<div class="dis"></div>
<div id="dis2"></div>
</body>
<script type="text/javascript">
$('.dis').createBar();
$('#dis2').createBar({
color: '#ff5f71',
value: 20,
name: '男生'
});
console.log($('.dis').GetValue());
</script>
</html>
Css代码如下:
.progress-box{
width: 500px;
padding: 15px;
}
.progress-box .progress-bar-box{
height: 8px;
overflow: inherit;
border-radius: 5px;
background: #dddee0;
width: 465px;
margin-left: 0px;
}
.progress-box .progress-bar-box .bar-scroll{
}
.progress-box .progress-bar-box .bar-scroll-box{
background-color: #009ddd;
position: relative;
border-radius: 5px;
width: 20%;
height: 8px;
}
.progress-box .progress-bar-box