CSS Jquery精美进度条和滑动条 滑块 插件

本文介绍了一款结合CSS3和jQuery制作的HTML滑动条和进度条插件,提供了丰富的样式和交互效果,适用于网页设计中各种进度显示和用户交互需求。

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

                       

这里写图片描述

<!doctype html><html><head><meta charset="utf-8"><meta name="keywords" content="Jquery精美进度条和滑动条插件,CSS精美进度条和滑动条插件,Html进度条插件,html滑动条插件"/><meta name="description" content="CSS3和Jq制作的Html滑动条和进度条插件-彭亚欧个人博客代码演示中心" /><link rel="stylesheet" href="http://www.pengyaou.com/LegendsZ/Design/DemoShow.css"/><title>CSS,Jquery精美进度条和滑动条插件</title><style type="text/css">#Main {    width: 70%;    height: 300px;    margin: 0 auto;    margin-top: 100px;}#scrollBar {    width: 80%;    height: 10px;    background-color: #ccc;    margin: 0 auto;    margin-top: 50px;    -webkit-border-radius: 2em;    -moz-border-radius: 2em;    border-radius: 2em;    cursor: pointer;}#scroll_Track {    width: 0px;    height: 10px;    background-color: #ff4400;    -webkit-border-radius: 2em;    -moz-border-radius: 2em;    border-radius: 2em;}#scroll_Thumb {    height: 25px;    width: 25px;    background-color: #efefef;    -webkit-border-radius: 2em;    -moz-border-radius: 2em;    border-radius: 2em;    border: 1px solid #ccc;    -webkit-box-shadow: 0px 0px 5px #ccc;    -moz-box-shadow: 0px 0px 5px #ccc;    box-shadow: 0px 0px 5px #ccc;    position: absolute;    margin-top: -18px;    cursor: pointer;}#scroll_Thumb:hover {    background-color: #ff4400;    border: 1px solid #fff;}#progressBar {    width: 80%;    height: 10px;    background-color: #ccc;    margin: 0 auto;    margin-top: 50px;    -webkit-border-radius: 2em;    -moz-border-radius: 2em;    border-radius: 2em;}#progressBar_Track {    width: 200px;    height: 10px;    background-color: #ff4400;    -webkit-border-radius: 2em;    -moz-border-radius: 2em;    border-radius: 2em;}#beian {    text-align: center;    float: left;    width: 100%;    margin-top: 50px}#beian a {    color: gray;    font: 13px "微软雅黑", Arial, Helvetica, sans-serif;}</style></head><body>      <div id="Demo">        <div id="Main">          <div id="scrollBar">            <div id="scroll_Track"></div>            <div id="scroll_Thumb"></div>          </div>          <p id="scrollBarTxt" style="text-align:center;"></p>          <div id="progressBar">            <div id="progressBar_Track"></div>          </div>          <p id="progressBarTxt" style="text-align:center;"></p>        </div>      </div></body><script type="text/javascript" src="http://www.pengyaou.com/jquery-1.4.min.js"></script><script type="text/javascript">        $(document).ready(function(e) {            //设置最大值            ScrollBar.maxValue=100;            //初始化            ScrollBar.Initialize();            //设置最大值            ProgressBar.maxValue=100;            //设置当前刻度            var index=0;            var mProgressTimer=setInterval(function(){                index+=2;                ProgressBar.SetValue(index);                },100);        });        var ScrollBar = {            value: 20,            maxValue: 100,            step: 1,            currentX: 0,            Initialize: function() {                if (this.value > this.maxValue) {                    alert("给定当前值大于了最大值");                    return;                }                this.GetValue();                $("#scroll_Track").css("width", this.currentX + 2 + "px");                $("#scroll_Thumb").css("margin-left", this.currentX + "px");                this.Value();                $("#scrollBarTxt").html(ScrollBar.value + "/" + ScrollBar.maxValue);            },            Value: function() {                var valite = false;                var currentValue;                $("#scroll_Thumb").mousedown(function() {                    valite = true;                    $(document.body).mousemove(function(event) {                        if (valite == false) return;                        var changeX = event.clientX - ScrollBar.currentX;                        currentValue = changeX - ScrollBar.currentX-$("#Demo").offset().left;                        $("#scroll_Thumb").css("margin-left", currentValue + "px");                        $("#scroll_Track").css("width", currentValue + 2 + "px");                        if ((currentValue + 25) >= $("#scrollBar").width()) {                            $("#scroll_Thumb").css("margin-left", $("#scrollBar").width() - 25 + "px");                            $("#scroll_Track").css("width", $("#scrollBar").width() + 2 + "px");                            ScrollBar.value = ScrollBar.maxValue;                        } else if (currentValue <= 0) {                            $("#scroll_Thumb").css("margin-left", "0px");                            $("#scroll_Track").css("width", "0px");                        } else {                            ScrollBar.value = Math.round(100 * (currentValue / $("#scrollBar").width()));                        }                        $("#scrollBarTxt").html(ScrollBar.value + "/" + ScrollBar.maxValue);                    });                });                $(document.body).mouseup(function() {                    ScrollBar.value = Math.round(100 * (currentValue / $("#scrollBar").width()));                    valite = false;                    if (ScrollBar.value >= ScrollBar.maxValue) ScrollBar.value = ScrollBar.maxValue;                    if (ScrollBar.value <= 0) ScrollBar.value = 0;                    $("#scrollBarTxt").html(ScrollBar.value + "/" + ScrollBar.maxValue);                });            },            GetValue: function() {                this.currentX = $("#scrollBar").width() * (this.value / this.maxValue);            }        }        var ProgressBar = {            maxValue: 100,            value: 20,            SetValue: function(aValue) {                this.value=aValue;                if (this.value >= this.maxValue) this.value = this.maxValue;                if (this.value <= 0) this.value = 0;                var mWidth=this.value/this.maxValue*$("#progressBar").width()+"px";                $("#progressBar_Track").css("width",mWidth);                $("#progressBarTxt").html(this.value+"/"+this.maxValue);            }        }    </script><!--[if IE 7]>   <style type="text/css">            .menuItem{ margin-left:-130px; }         </style>    <![endif]--></html>
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
           

给我老师的人工智能教程打call!http://blog.youkuaiyun.com/jiangjunshow
这里写图片描述
非常精美的h5 进度条 |DEMO_jQuery之家-自由分享jQueryhtml5、css3的插件库 <!----> .ClassyCountdownDemo { margin:0 auto 30px auto; max-width:800px; width:calc(100%); padding:30px; display:block } #countdown2 { background:#FFF } #countdown3 { background:rgb(52, 73, 94) } #countdown4 { background:#222 } #countdown5 { background:#222 } #countdown6 { background:#222 } #countdown7 { background:#222 } #countdown8 { background:#222 } #countdown9 { background:#FFF } #countdown10 { background:#3498db } jQuery炫酷图片预览Lightbox插件 A jQuery plugin designed to provide gallery view for images jQuery之家 返回下载页 Example $(document).ready(function() { $('#countdown15').ClassyCountdown({ theme: "flat-colors", end: $.now() + 10000 }); $('#countdown16').ClassyCountdown({ theme: "flat-colors-wide", end: $.now() + 10000 }); $('#countdown17').ClassyCountdown({ theme: "flat-colors-very-wide", end: $.now() + 10000 }); $('#countdown18').ClassyCountdown({ theme: "flat-colors-black", end: $.now() + 10000 }); $('#countdown1').ClassyCountdown({ theme: "white", end: $.now() + 645600 }); $('#countdown5').ClassyCountdown({ theme: "white", end: $.now() + 10000 }); $('#countdown6').ClassyCountdown({ theme: "white-wide", end: $.now() + 10000 }); $('#countdown7').ClassyCountdown({ theme: "white-very-wide", end: $.now() + 10000 }); $('#countdown8').ClassyCountdown({ theme: "white-black", end: $.now() + 10000 }); $('#countdown11').ClassyCountdown({ theme: "black", style: { secondsElement: { gauge: { fgColor: "#F00" } } }, end: $.now() + 10000 }); $('#countdown12').ClassyCountdown({ theme: "black-wide", labels: false, end: $.now() + 10000 }); $('#countdown13').ClassyCountdown({ theme: "black-very-wide", labelsOptions: { lang: { days: 'D', hours: 'H', minutes: 'M', seconds: 'S' }, style: 'font-size:0.5em; text-transform:uppercase;' }, end: $.now() + 10000 }); $('#countdown14').ClassyCountdown({ theme: "black-black", labelsOptions: { style: 'font-size:0.5em; text-transform:uppercase;' }, end: $.now() + 10000 }); $('#countdown4').ClassyCountdown({ end: $.now() + 10000, labels: true, style: { element: "", textResponsive: .5, days: { gauge: { thickness: .03, bgColor: "rgba(255,255,255,0.05)", fgColor: "#1abc9c" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;' }, hours: { gauge: { thickness: .03, bgColor: "rgba(255,255,255,0.05)", fgColor: "#2980b9" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;' }, minutes: { gauge: { thickness: .03, bgColor: "rgba(255,255,255,0.05)", fgColor: "#8e44ad" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;' }, seconds: { gauge: { thickness: .03, bgColor: "rgba(255,255,255,0.05)", fgColor: "#f39c12" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#fff;' } }, onEndCallback: function() { console.log("Time out!"); } }); $('#countdown2').ClassyCountdown({ end: '1388468325', now: '1378441323', labels: true, style: { element: "", textResponsive: .5, days: { gauge: { thickness: .01, bgColor: "rgba(0,0,0,0.05)", fgColor: "#1abc9c" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' }, hours: { gauge: { thickness: .01, bgColor: "rgba(0,0,0,0.05)", fgColor: "#2980b9" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' }, minutes: { gauge: { thickness: .01, bgColor: "rgba(0,0,0,0.05)", fgColor: "#8e44ad" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' }, seconds: { gauge: { thickness: .01, bgColor: "rgba(0,0,0,0.05)", fgColor: "#f39c12" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' } }, onEndCallback: function() { console.log("Time out!"); } }); $('#countdown9').ClassyCountdown({ end: '1388468325', now: '1380501323', labels: true, style: { element: "", textResponsive: .5, days: { gauge: { thickness: .05, bgColor: "rgba(0,0,0,0)", fgColor: "#1abc9c", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' }, hours: { gauge: { thickness: .05, bgColor: "rgba(0,0,0,0)", fgColor: "#2980b9", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' }, minutes: { gauge: { thickness: .05, bgColor: "rgba(0,0,0,0)", fgColor: "#8e44ad", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' }, seconds: { gauge: { thickness: .05, bgColor: "rgba(0,0,0,0)", fgColor: "#f39c12", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:#34495e;' } }, onEndCallback: function() { console.log("Time out!"); } }); $('#countdown10').ClassyCountdown({ end: '1397468325', now: '1388471324', labels: true, labelsOptions: { lang: { days: 'D', hours: 'H', minutes: 'M', seconds: 'S' }, style: 'font-size:0.5em; text-transform:uppercase;' }, style: { element: "", textResponsive: .5, days: { gauge: { thickness: .02, bgColor: "rgba(255,255,255,0.1)", fgColor: "rgba(255,255,255,1)", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, hours: { gauge: { thickness: .02, bgColor: "rgba(255,255,255,0.1)", fgColor: "rgba(255,255,255,1)", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, minutes: { gauge: { thickness: .02, bgColor: "rgba(255,255,255,0.1)", fgColor: "rgba(255,255,255,1)", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, seconds: { gauge: { thickness: .02, bgColor: "rgba(255,255,255,0.1)", fgColor: "rgba(255,255,255,1)", lineCap: 'round' }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, }, onEndCallback: function() { console.log("Time out!"); } }); $('#countdown3').ClassyCountdown({ end: '1390868325', now: '1388461323', labels: true, labelsOptions: { lang: { days: 'Zile', hours: 'Ore', minutes: 'Minute', seconds: 'Secunde' }, style: 'font-size:0.5em; text-transform:uppercase;' }, style: { element: "", textResponsive: .5, days: { gauge: { thickness: .2, bgColor: "rgba(255,255,255,0.2)", fgColor: "rgb(241, 196, 15)" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, hours: { gauge: { thickness: .2, bgColor: "rgba(255,255,255,0.2)", fgColor: "rgb(241, 196, 15)" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, minutes: { gauge: { thickness: .2, bgColor: "rgba(255,255,255,0.2)", fgColor: "rgb(241, 196, 15)" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' }, seconds: { gauge: { thickness: .2, bgColor: "rgba(255,255,255,0.2)", fgColor: "rgb(241, 196, 15)" }, textCSS: 'font-family:\'Open Sans\'; font-size:25px; font-weight:300; color:rgba(255,255,255,0.7);' } }, onEndCallback: function() { console.log("Time out!"); } }); }); 如果你喜欢这个插件,那么你可能也喜欢: html5+jquery通过鼠标控制的圆形进度条 jQuerycss3旋钮控制按钮-knobKnob
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值