新建div,取名progress,如下

<div class="progress"></div>

在里面插入条纹进度条,以及进度显示文本进度:

<div class="progress-bar progress-bar-info progress-bar-striped active" style="width: 75%;">
<div class="progress-value">75%</div>
</div>

添加样式

.progress{
height: 25px;
background: #262626;
padding: 5px;
overflow: visible;
border-radius: 20px;
border-top: 1px solid #000;
border-bottom: 1px solid #7992a8;
margin-top: 50px;
}
.progress-bar {
float: left;
width: 0;
height: 100%;
font-size: 12px;
line-height: 20px;
color: #fff;
text-align: center;
background-color: #337ab7;
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
}
.progress .progress-bar{
border-radius: 20px;
position: relative;
animation: animate-positive 2s;
}
.progress .progress-value{
display: block;
padding: 3px 7px;
font-size: 13px;
color: #fff;
border-radius: 4px;
background: #191919;
border: 1px solid #000;
position: absolute;
top: -40px;
right: -10px;
}
.progress-bar-info {
background-color: #5bc0de;
}
.progress .progress-value:after{
content: "";
border-top: 10px solid #191919;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
position: absolute;
bottom: -6px;
left: 26%;
}
.progress-bar-striped {
background-image: -webkit-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-image: -o-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-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);
-webkit-background-size: 20px 20px;
background-size: 20px 20px;
}
@-webkit-keyframes animate-positive{
0% { width: 0; }
}
@keyframes animate-positive{
0% { width: 0; }
}

最后效果如下:

这里需要注意的是css3,keyframes的兼容性如下,ie9及以下就别用了:

css3条纹进度条的更多相关文章

  1. CSS3动画进度条

    CSS3动画进度条   CSS CODE: @-webkit-keyframes move{ 0%{ background-position: 0 0; } 100%{ background-posi ...

  2. 纯CSS3制作进度条源代码

    <!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8&qu ...

  3. Javascript 及 CSS3 实现进度条效果

    Javascript 及 CSS3 实现进度条效果 一:css2 属性clip实现网页进度条:  在实现之前,我们先来介绍一下clip属性,因为这个属性在css2.1中很少使用到,所以我们有必要来了解 ...

  4. 两种CSS3圆环进度条详解

    晚上睡觉之前,我抽了1个多小时,研究了一下圆环进度条,结合从网上查阅的资料,我终于掌握了两种圆环的生成方法. 这次的效果就是单纯的CSS3效果,也没有写具体的JS,等以后有时间在好好整理一下吧~. 第 ...

  5. css3实现进度条的模拟

    两种进度条动画的实现: 1.css3,但IE9-不支持. 2.js动画,兼容性好,但没有css3实现的顺畅 Demo: <html>    <head>        < ...

  6. 学习 | css3实现进度条加载

    进度条加载是页面加载时的一种交互效果,这样做的目的是提高用户体验. 进度条的的实现分为3大部分:1.页面布局,2.进度条动效,3.何时进度条增加. 文件目录 加载文件顺序 <link rel=& ...

  7. css3彩色进度条

    <html>    <head>        <title>progress</title>        <script type=" ...

  8. css3圈圈进度条

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...

  9. css3实现进度条

    HTML 结构很简单,但不是 Single Element: <div class="spinner"><i></i></div> ...

随机推荐

  1. C语言注意事项

    #include <stdio.h> int main() { /*********************************************** * 指针使用注意事项: * ...

  2. wdcp后台登陆访问失败处理方法

    用putty或xsheel链接 进入之后输入命令 service wdcp restart 之后显示ok就成功了

  3. KiCAD的一些快捷操作(类比于AD)

    一.原理图快捷操作 二.PCB快捷操作 Q: 在布线过程中,用来编辑线宽,和AD中布线时“Tab”的作用相似 W: 选择设定好的线宽,线宽减小 Shift+W: 选择设定好的线宽,线宽变大 /: 改变 ...

  4. 【JS学习】慕课网9-14 删除结点操作的问题

    试一试,定义clearText()函数,完成节点内容的删除. 1. 删除该节点的内容,先要获取子节点. 2. 然后使用循环遍历每个子节点. 3. 使用removeChild()删除节点. 特别要注意的 ...

  5. Spring定时任务的几种实现(转)

    转自:http://gong1208.iteye.com/blog/1773177 近日项目开发中需要执行一些定时任务,比如需要在每天凌晨时候,分析一次前一天的日志信息,借此机会整理了一下定时任务的几 ...

  6. java架构的演变

    传统构架 传统构架是部署在一个tomcat上的,Tomcat 默认配置的最大请求数是 150,也就是说同时支持 150 个并发,当某个应用拥有 250 个以上并发的时候,应考虑应用服务器的集群.因此当 ...

  7. PHP-全排列

    给定一个没有重复数字的序列,返回其所有可能的全排列. 示例: 输入: [1,2,3]输出:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]] ...

  8. transform:translate(-50%,-50%)

    和父亲元素没关系,走自己盒子宽度一半

  9. loj2064[HAOI2016]找相同字符

    题意:给你两个字符串,问其中各取一个子串,有多少对相同?n<=20W. 标程: #include<bits/stdc++.h> using namespace std; typede ...

  10. ssh-key添加之后依旧需要密码输入Bug的解决

    场景重现 要求从10.183.93.181的root用户ssh免密登录至10.110.155.26的boss用户 1.在10.110.155.26 的boss用户下面新建目录.ssh 2.在10.11 ...