这是一款CSS3斑马线进度条动画特效。该进度条采用bootstrap的斑马线进度条,在它的基础上,通过一些CSS样式来进行进一步的美化,生成炫酷的斑马线进度条动画特效。
使用方法
在页面中引入bootstrap.min.css文件。
<link href="css/bootstrap.min.css" rel="stylesheet">
HTML结构
该CSS3斑马线进度条动画特效的基本HTML结构如下:
<div class="container">
<div class="row">
<div class="col-md-offset-3 col-md-6">
<h3 class="progress-title">HTML5 - 60%</h3>
<div class="progress">
<div class="progress-bar progress-bar-danger progress-bar-striped active" style="width:60%;"></div>
</div>
<h3 class="progress-title">CSS3 - 90%</h3>
<div class="progress">
<div class="progress-bar progress-bar-info progress-bar-striped active" style="width:90%;"></div>
</div>
<h3 class="progress-title">J-Query - 50%</h3>
<div class="progress">
<div class="progress-bar progress-bar-warning progress-bar-striped active" style="width:50%;"></div>
</div>
<h3 class="progress-title">PHP - 80%</h3>
<div class="progress">
<div class="progress-bar progress-bar-success progress-bar-striped active" style="width:80%;"></div>
</div>
</div>
</div>
</div>
</div>
CSS样式
然后通过下面的CSS代码来美化该该斑马线进度条动画特效。
.progress-title{
font-size: 18px;
font-weight: 700;
color: #1c2647;
margin: 0 0 10px;
}
.progress{
height: 30px;
background: #fff;
border-top: 5px solid #1c2647;
border-bottom: 5px solid #1c2647;
border-radius: 0;
margin-bottom: 25px;
overflow: visible;
position: relative;
}
.progress:before,
.progress:after{
content: "";
width: 5px;
background: #1c2647;
position: absolute;
top: 0;
left: -5px;
bottom: 0;
}
.progress:after{
left: auto;
right: -5px;
}
.progress .progress-bar{
border: none;
box-shadow: none;
-webkit-animation: 2s linear 0s normal none infinite running progress-bar-stripes,animate-positive 1s;
animation: 2s linear 0s normal none infinite running progress-bar-stripes,animate-positive 1s;
}
@-webkit-keyframes animate-positive{
0%{ width: 0; }
}
@keyframes animate-positive{
0%{ width: 0; }
}