jquery实现10款好看的进度条效果代码
代码语言:html
所属分类:进度条
代码描述:jquery实现10款好看的进度条效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<style>
.container{width:500px;margin:auto}
.progress {
position: relative;
z-index: 5;
background: #484848;
border: 10px solid #282828;
border-radius: 20px;
display: inline-block;
box-shadow: 0 5px 17px rgba(40, 40, 40, 0.5), 0 0 3px 1px rgba(40, 40, 40, 0.5) inset;
}
.progress-text {
position: absolute;
font: bold 14px/20px Arial;
text-align: center;
top: 0;
left: 0;
}
.progress, .progress-bar, .progress-text {
width: 200px;
max-width: 200px;
height: 20px;
}
.progress .progress-text:first-child {
z-index: 5;
color: white;
}
.progress .progress-text:last-child {
z-index: 10;
color: black;
}
.progress-bar {
overflow: hidden;
position: relative;
z-index: 10;
border-radius: 12px;
width: 0;
-moz-transition: width .2s linear;
-webkit-transition: width .2s linear;
-o-transition: width .2s linear;
transition: width .2s linear;
}
/* Test Style */
.progress.test .progress-bar {
background-color: #00baba;
background-image: -moz-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: -webkit-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: -o-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: -ms-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: linear-gradient(to right, #d1fffb 0%, #00baba 100%);
background-size: 200px 20px;
overflow: visible;
}
.progress.test .progress-text:first-child {
display: none;
}
.progress.test .progress-text:last-child {
left: auto;
top: auto;
bottom: -26px;
right: -12px;
display: block;
background-color: #00baba;
width: 40px;
height: 20px;
border-radius: 3px;
}
.test[data-width='0%'] .progress-text:last-child {
display: none;
}
.progress.test .progress-text:last-child:before {
position: absolute;
left: 12px;
top: -6px;
content: '';
width: 0;
height: 0;
border-style: solid;
border-width: 0 6px 6px 6px;
border-color: transparent transparent #00baba transparent;
}
/* Copper style */
.progress.copper .progress-bar {
background-color: #b68d4c;
background-image: -moz-linear-gradient(top, #f3e2c7 0%, #b68d4c 51%, #e9d4b3 100%);
background-image: -webkit-linear-gradient(top, #f3e2c7 0%, #b68d4c 51%, #e9d4b3 100%);
background-image: -ms-linear-gradient(top, #f3e2c7 0%, #b68d4c 51%, #e9d4b3 100%);
background-image: linear-gradient(to bottom, #f3e2c7 0%, #b68d4c 51%, #e9d4b3 100%);
box-shadow: inset 2px 2px 3px 0 rgba(255, 255, 255, 0.75), inset -3px 0 3px 0 rgba(255, 255, 255, 0.75);
}
/* Aqua Style */
.progress.aqua .progress-bar {
background-color: #00baba;
background-image: -moz-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: -webkit-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: -o-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: -ms-linear-gradient(left, #d1fffb 0%, #00baba 100%);
background-image: linear-gradient(to right, #d1fffb 0%, #00baba 100%);
background-size: 200px 20px;
}
/* Candystripe style */
.progress.candy .progress-bar {
background-color: #d00;
box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3) inset;
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.35) 75%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0));
background-repeat: repeat-x;
background-size: 20px 20px;
-webkit-animation: candystripe 1s linear infinite;
-moz-animation: candystripe 1s linear infinite;
animation: candystripe 1s linear infinite;
}
@-webkit-keyframes candystripe {
to {
background-position: 20px 0;
}
}
@-moz-keyframes candystripe {
to {
background-position: 20px 0;
}
}
@keyframes candystripe {
to {
background-position: 20px 0;
}
}
/* Pulsating Neon style */
.progress.neon .progress-bar {
background-color: #fff;
box-shadow: 0 0 5px #01fe32 inset.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0