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


 <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. VS2010打开就自动关闭问题解决

    前段时间开发没有使用VSS,打开项目一直正常,后来嵌入到VSS后出现了VS2010打开后就自动关闭的问题. 刚开始我重新卸载.安装了VS2010,但是还是有问题,后来重新创建了空解决方案,再次引入就正 ...

  2. Simple Membership 学习笔记

    第一步:新建项目后添加对WebMartix.Data 和 WebMatrix.WebData的引用第二步:在web.config中添加membership配置节第三步:修改Global.asax文件 ...

  3. [课程相关]homework-08

    一.变量作用域和生命周期 #include <cstdlib> #include <iostream> using namespace std; void try_change ...

  4. [改善Java代码]枚举和注解结合使用威力更大

    注解的写法和接口很类似,都采用了关键字interface,而且都不能有实现代码,常量定义默认都是pulbic static final类型的. 他们的主要不同点是:注解在interface前加上@字符 ...

  5. 关于Linux系统和Windows系统中文件夹的命名规范

    Windows系统中. 1.在创建文件夹的时候不能以"."开头(但是文件以多个点开头并且还有其他合法字符的话就是合法的) 但是在windows系统中确实见过以一个点".& ...

  6. [Wordpress]Wordpress使用SMTP发送电邮

    参考:phpmailer_init中的代码,可以配置使用SMTP发送电邮 官方的案例代码是: add_action( 'phpmailer_init', 'my_phpmailer_example' ...

  7. Java Concurrency - Fork/Join Framework

    Normally, when you implement a simple, concurrent Java application, you implement some Runnable obje ...

  8. MyBatis(3.2.3) - One-to-many mapping

    In the sample domain model, a tutor can teach one or more courses. This means that there is a one-to ...

  9. nginx限制ip请求次数 以及并发次数

    如何设置能限制某个IP某一时间段的访问次数是一个让人头疼的问题,特别面对恶意的ddos攻击的时候.其中CC攻击(Challenge Collapsar)是DDOS(分布式拒绝服务)的一种,也是一种常见 ...

  10. hdoj1423 最长上升公共子序列

    hdoj1423 题目分析: 两个数组a[n1] , b[n2], 求最长上升公共子序列. 我们可用一维存储 f[i] 表示 b 数组以 j 结尾, 与 a[] 数组构成的最长公共上升子序列. 对数组 ...