夜深了,废话不多说,先上代码:


 <style>
* {
box-sizing: border-box
} .wrapper {
width: 350px;
margin: 200px auto
} .wrapper .load-bar {
width: 100%;
height: 25px;
border-radius: 30px;
background: #70b4e5;
border-radius: 1rem;
-webkit-box-shadow: inset -2px 0 2px #3189dd, inset 0 -2px 2px #d4edf9, inset 2px 0 2px #d4edf9, inset 0 2px 2px #3189dd;
box-shadow: inset -2px 0 2px #3189dd, inset 0 -2px 2px #d4edf9, inset 2px 0 2px #d4edf9, inset 0 2px 2px #3189dd;
position: relative
} .wrapper .load-bar:hover #counter, .wrapper .load-bar:hover .load-bar-inner {
animation-play-state: paused;
-moz-animation-play-state: paused;
-o-animation-play-state: paused;
-webkit-animation-play-state: paused
} .wrapper .load-bar-inner {
height: 99%;
width:;
border-radius: inherit;
position: relative;
background: url(images/bar.jpg) repeat;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 1px 5px rgba(0, 0, 0, .3), 0 4px 5px rgba(0, 0, 0, .3);
animation: loader 10s linear infinite;
-moz-animation: loader 10s linear infinite;
-webkit-animation: loader 10s linear infinite;
-o-animation: loader 10s linear infinite
} .wrapper #counter {
position: absolute;
background: #eeeff3;
background: linear-gradient(#eeeff3, #cbcbd3);
background: -moz-linear-gradient(#eeeff3, #cbcbd3);
background: -webkit-linear-gradient(#eeeff3, #cbcbd3);
background: -o-linear-gradient(#eeeff3, #cbcbd3);
padding: 5px 10px;
border-radius: .4em;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 2px 4px 1px rgba(0, 0, 0, .2), 0 1px 3px 1px rgba(0, 0, 0, .1);
left: -25px;
top: -50px;
font-size: 12px;
font-weight:;
width: 44px;
animation: counter 10s linear infinite;
-moz-animation: counter 10s linear infinite;
-webkit-animation: counter 10s linear infinite;
-o-animation: counter 10s linear infinite
} .wrapper #counter:after {
content: "";
position: absolute;
width: 8px;
height: 8px;
background: #cbcbd3;
transform: rotate(45deg);
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-o-transform: rotate(45deg);
left: 50%;
margin-left: -4px;
bottom: -4px;
box-shadow: 3px 3px 4px rgba(0, 0, 0, .2), 1px 1px 1px 1px rgba(0, 0, 0, .1);
border-radius: 0 0 3px 0
} @keyframes loader {
from {
width: 0
}
to {
width: 100%
}
} @-moz-keyframes loader {
from {
width: 0
}
to {
width: 100%
}
} @-webkit-keyframes loader {
from {
width: 0
}
to {
width: 100%
}
} @-o-keyframes loader {
from {
width: 0
}
to {
width: 100%
}
} @keyframes counter {
from {
left: -25px
}
to {
left: 323px
}
} @-moz-keyframes counter {
from {
left: -25px
}
to {
left: 323px
}
} @-webkit-keyframes counter {
from {
left: -25px
}
to {
left: 323px
}
} @-o-keyframes counter {
from {
left: -25px
}
to {
left: 323px
}
} @keyframes loader {
from {
width: 0
}
to {
width: 100%
}
} .load-bar-inner {
height: 99%;
width:;
border-radius: inherit;
position: relative;
background: #c2d7ac;
background: linear-gradient(#e0f6c8, #98ad84);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 1px 5px rgba(0, 0, 0, .3), 0 4px 5px rgba(0, 0, 0, .3);
animation: loader 10s linear infinite
} </style>
<div class="wrapper">
<div class="load-bar">
<div class="load-bar-inner" data-loading="0"><span id="counter"></span></div>
</div>
</div>
<script type="text/javascript">
$(function () { var interval = setInterval(increment, 99);
var current = 0;
function increment() {
current++;
$('#counter').html(current + '%');
if (current == 95) {
clearInterval(interval);
location.href = "https://www.baidu.com";
return;
}
}
});
</script>
效果图:

												

用css3写出来的进度条的更多相关文章

  1. 图解CSS3制作圆环形进度条的实例教程

    圆环形进度条制作的基本思想还是画出基本的弧线图形,然后CSS3中我们可以控制其旋转来串联基本图形,制造出部分消失的效果,下面就来带大家学习图解CSS3制作圆环形进度条的实例教程 首先,当有人说你能不能 ...

  2. 详解用CSS3制作圆形滚动进度条动画效果

    主  题 今天手把手教大家用CSS3制作圆形滚动进度条动画,想不会都难!那么,到底是什么东东呢?先不急,之前我分享了一个css实现进度条效果的博客<CSS实现进度条和订单进度条>,但是呢, ...

  3. 浅谈一下关于使用css3来制作圆环进度条

    最近PC端项目要做一个这样的页面出来,其他的都很简单,关键在于百分比的圆环效果.我最初打算是直接使用canvas来实现的,因为canvas实现一个圆是很简便的. 下面贴出canvas实现圆环的代码,有 ...

  4. 如何用SVG写一个环形进度条以及动画

    本次案例主要使用了svg的三个元素,分别为circle.text.path,关于svg的介绍大家可以看MDN上的相关教程,传送门 由于svg可以写到HTML中,所以这里我们就可以很方便的做进度条加载动 ...

  5. 【Demo】CSS3 动画 加载进度条

    实例结果图: 完整代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> ...

  6. svg和css3创建环形渐变进度条

    在负责的项目中,有一个环形渐变读取进度的效果的需求,于是在网上查阅相关资料整理一下.代码如下: <!DOCTYPE html> <html lang="en"&g ...

  7. 基于css3的环形动态进度条(原创)

    基于css3实现的环形动态加载条,也用到了jquery.当时的想法是通过两个半圆的转动,来实现相应的效果,其实用css3的animation也可以实现这种效果.之所以用jquery是因为通过jquer ...

  8. 超赞的CSS3进度条 可以随进度显示不同颜色

    原文:超赞的CSS3进度条 可以随进度显示不同颜色 现在的WEB已经不是以前的WEB了,传输更大的数据量,有着更加复杂的计算,这就需要利用进度条来提高用户体验,必要时可以让用户耐心等待,不至于因操作卡 ...

  9. 分享9款极具创意的HTML5/CSS3进度条动画

    1.HTML5/CSS3图片加载进度条 可切换多主题 今天要分享的这款HTML5/CSS3进度条模拟了真实的图片加载场景,插件会默认去从服务器下载几张比较大的图片,然后让该进度条展现当前读取图片的进度 ...

随机推荐

  1. truncate 与 delete 的区别

    Delete删除的数据可以通过日志文件进行恢复 Truncate Table删除的数据不能进行恢复 Delete删除时,标识列取值保留原使用中最大值 Truncate Table删除时,标识列恢复到最 ...

  2. freeswitch 配置 DID 方法

    本文来自 csdn     http://blog.csdn.net/voipmaker   转载注明出处,谢谢. 我建了一个 Freeswitch学习 交流群, 45211986, 欢迎加入. DI ...

  3. SQLite数据库中获取新插入数据的自增长ID

    SQLite数据库中有一有列名为ID的自增列,项目需求要在向数据库在插入新数据的同时返回新插入数据行的ID. 我这里用事务,把插入和查询语句通过ExecuteReader一起提交,返回DbDataRe ...

  4. Qt增加webp格式支持

    Webp 是一种图片文件格式,能在相同质量的情况下比 PNG 文件尺寸小巧. Chrome 应用商店图片已全部转换为 WebP 格式 YY(基于Qt开发)也已经把图片格式换成webp了 http:// ...

  5. ASP.NET MVC and jqGrid 学习笔记 2-如何从本地获得数据

    上回说到jqgrid的基本配置,同时演示了显示数据的一种方法——datatype: "local".这种方法是从本地获取的,确切地说是在前端页面的javascript里写的硬编码. ...

  6. git merge branches

    git clone url #克隆新的版本库 git init git pull repo_name #有关联的远程库,抽取并和本地合并 git fetch remote_repo_name #抽取并 ...

  7. <Think Complexity> 用字典实现图

    今天在图书馆闲逛的时候偶然看见<Think Complexity>(复杂性思考)这本书,下午看了一会儿觉得很有意思.本书第二章讲的是用Python实现的图,特别写篇博客记录.   首先,图 ...

  8. 使用迭代器遍历List的时候修改List报ConcurrentModificationException异常的解决办法

    为了避免这种异常,我们可以使用CopyOnWriteArrayList来代替ArrayList,CopyOnWriteArrayList支持并发访问,所以同时进行迭代和修改是没有问题的.

  9. Centos系统使用代理上网时 yum的代理设置

    yum的存在使centos上软件的安装.配置.升级.卸载变得十分的方便,但是当安装centos的机器是通过代理服务器访问外网的话,yum的 使用就变得无从下手了,以下介绍以下怎样为yum配置代理地址及 ...

  10. html 超出出现省略号

    .workTitle > a{ height: 26px; line-height: 26px; display: inline-block; text-overflow: ellipsis; ...