概述
效果展示:
代码展示:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>纯CSS3仿bootstrap动态进度条</title>
<style>
.progress {
height: 20px;
margin-bottom: 20px;
overflow: hidden;
background-color: #f5f5f5;
border-radius: 4px;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
}
.progress-bar {
float: left;
width: 0;
height: 100%;
font-size: 12px;
line-height: 20px;
color: #fff;
text-align: center;
background-color: #337ab7;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
transition: width .6s ease;
}
.progress-bar-danger {
background-color: #d9534f;
}
.progress-striped .progress-bar, .progress-bar-striped {
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-size: 40px 40px;
}
.progress.active .progress-bar, .active {
animation: progress-bar-stripes 2s linear infinite;
}
@keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
.aa {
width: 500px;
height: 30px;
}
.bb {
width: 200px;
height: 100%;
}
</style>
</head>
<body>
<div class="progress aa">
<div class="progress-bar progress-bar-danger progress-bar-striped active bb"></div>
</div>
</body>
</html>
<!--核心代码-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>纯CSS3仿bootstrap动态进度条</title>
<style>
div{
width: 800px;
height: 40px;
border: 1px solid #000;
border-radius: 5px;
background-color: #d9534f; /*背景色 底色*/
/*background-image: url("a.gif");*/
/*自定义渐变重复效果*/
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-size: 40px 40px; /*设置大小*/
animation: a 2s linear infinite ;
}
/*动画*/
@keyframes a {
0%{
background-position: 0 0;
}
100%{
background-position: 40px 0;
}
}
</style>
</head>
<body>
<div></div>
</body>
</html>
最后
以上就是曾经鱼为你收集整理的纯CSS3仿bootstrap动态进度条效果展示:代码展示:的全部内容,希望文章能够帮你解决纯CSS3仿bootstrap动态进度条效果展示:代码展示:所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复