<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css"> .container {
width: 960px;
margin: 0 auto;
overflow: hidden;
} /* Full Width Progress Bar */ #content {
width: 200px;
height: 5px;
margin: 50px auto;
background: #ccc;
border-radius:15px;
} .fullwidth .expand {
width: 200px;
height: 1px;
margin: 2px 0;
/*background: #2187e7;*/
background: #1463ad;
position: absolute;
box-shadow: 0px 0px 10px 1px rgba(0,198,255,0.7);
-moz-animation: fullexpand 10s ease-out;
-webkit-animation: fullexpand 10s ease-out;
} @-moz-keyframes fullexpand {
0% {
width: 0px;
} 100% {
width: 200px;
}
} @-webkit-keyframes fullexpand {
0% {
width: 0px;
} 100% {
width: 200px;
}
} /* Trigger button for javascript */ .trigger, .triggerFull, .triggerBar {
background: #000000;
background: -moz-linear-gradient(top, #161616 0%, #000000 100%);
background: -webkit-linear-gradient(top, #161616 0%,#000000 100%);
border-left: 1px solid #111;
border-top: 1px solid #111;
border-right: 1px solid #333;
border-bottom: 1px solid #333;
font-family: Verdana, Geneva, sans-serif;
font-size: 0.8em;
text-decoration: none;
text-transform: lowercase;
text-align: center;
color: #fff;
padding: 10px;
border-radius: 3px;
display: block;
margin: 0 auto;
width: 140px;
} .trigger:hover, .triggerFull:hover, .triggerBar:hover {
background: -moz-linear-gradient(top, #202020 0%, #161616 100%);
background: -webkit-linear-gradient(top, #202020 0%, #161616 100%);
}
</style>
<script src="/js/jquery-1.8.3-min.js"></script>
<script> $(document).ready(function () {
//多久之后开始执行
var duration = 10; $('#content').removeClass('fullwidth');
$('.triggerFull').click(function () {
//清除使用了 finish() 方法之后的样式
$(".expand").removeAttr("style");
$('#content').removeClass('fullwidth').delay(duration).queue(function (next) {
$(this).addClass('fullwidth');
next();
});
return false;
});
}); function finish()
{
$(".fullwidth .expand").css({ "-moz-animation": "fullexpand 1s ease-out", "-webkit-animation": "fullexpand 1s ease-out" }); } </script>
</head>
<body>
<!-- FULL WIDTH -->
<div id="content">
<span class="expand"></span>
</div>
<a class="triggerFull" href="#">Start/Restart Animation</a>
<!-- END FULL WIDTH --> <input type="button" value="finish" onclick="finish()" /> </body>
</html>

js 进度条,可实现结束和重新开始的更多相关文章

  1. js进度条源码下载—js进度条代码

    现在很多网站会用到进入网站特效,到网页没有加载完成的时候,会有一个loding特效,加载完了之后才能看到页面,今天就带着做一个js进度条效果,今天要做的效果是纯js进度条加载,没有用到框架,方便大家进 ...

  2. YprogressBar,html5进度条样式,js进度条插件

    简介 YprogressBar是一款基于HTML5的进度条插件. YprogressBar是一款轻量级进度条插件,使用方便,资源占用少,模仿好压的解压界面,带有数字显示,同时支持在描述中增加参数,以动 ...

  3. 简易js进度条

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. 在vue项目中使用Nprogress.js进度条

    NProgress是一款在网页顶部添加细长进度条的工具,非常轻巧,使用起来也非常便捷,灵感来源于Google, YouTube. 1.安装 $ npm install --save nprogress ...

  5. JS进度条顺滑版实现

    进度条不顺滑 相信大多前端同学都自己写过音频.视频播放器,实现并不复杂.最近在小程序里,做了一个类似微博刷视频的需求.其中有一部分功能需要实现自定义进度条,在做完第一版之后发现进度条不顺滑,而后想查查 ...

  6. js进度条实现

    1.先设置CSS样式(可自定义) /*#region 进度条 */ .progbar { background-color: #e1e1e1; width:auto; color: #222; hei ...

  7. js 进度条效果

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

  8. js进度条插件pace.js

    主要用到themes文件夹和pace.js文件

  9. js进度条小事例

    <style> #div1{width: 500px;height: 20px;border: 1px solid gray;} #div2{height: 20px;width: 0px ...

随机推荐

  1. T-SQL 使用WITH高效分页

    一.WITH AS 含义     WITH AS短语,也叫做子查询部分(subquery factoring),可以让你做很多事情,定义一个SQL片断,该SQL片断会被整个SQL语句所用到.有的时候, ...

  2. MySQL数据库在WINDOWS系统CMD下的编码问题

    MySQL数据库在WINDOWS系统CMD下的编码问题 1. 查看MySQL数据库编码 * SHOW VARIABLES LIKE 'char%'; 2. 编码解释 * character_set_c ...

  3. 用PHP链接mysql数据库

    PHP提供了两套数据库可用于访问mysql数据库 1)MySQL扩展函数数据库 2)MySQLI扩展数据库(improved) 使用MySQLI函数访问MySQL数据库步骤 1)链接数据库管理系统 m ...

  4. android常用对话框封装

    在android开发中,经常会用到对话框跟用户进行交互,方便用户可操作性:接下来就对常用对话框进行简单封装,避免在项目中出现冗余代码,加重后期项目的维护量:代码如有问题欢迎大家拍砖指正一起进步. 先贴 ...

  5. Oracle常用命令

    查看数据库锁的情况 SELECT object_name, machine, s.sid, s.serial#  FROM gv$locked_object l, dba_objects o, gv$ ...

  6. kafka基本原理学习

    下载安装地址:http://kafka.apache.org/downloads.html  原文链接:http://www.jasongj.com/2015/01/02/Kafka深度解析 Kafk ...

  7. Codeforces Round #354 (Div. 2)-B

    B. Pyramid of Glasses 题目链接:http://codeforces.com/contest/676/problem/B Mary has just graduated from ...

  8. react-router

    基本的构建 import ReactRouter from 'react-router'; let {Route, Router, Link, IndexRoute} = ReactRouter.Ro ...

  9. wordpress发送测试邮件

    下面的邮箱设置使用了qq邮箱的设置 写上接收测试邮件的邮箱  再send test

  10. 微信客户端自带的Js Api:WeixinJSBridge

    <!DOCTYPE html> <html> <head> <title>微信WeixinJSBridge API</title> < ...