js控制进度条到达100%跳转界面一
进度条一般在手机上用到的比较广泛,刚好最近的项目也是一直在做手机站,这个特效是手机端的一个界面,现在我把改成pc端了,进度条的快慢速度和样式可自行调节,改动也是很方便的,不多说,看代码:
<style>
* {
margin:;
padding:;
} html, body {
font-family: arial, "microsoft yahei";
font-size: 14px;
background: #c2d7ac;
} .progress {
width: 300px;
height: 30px;
margin: auto;;
background: #70b4e5;
border-radius: 5px;
-webkit-box-shadow: inset -2px 0px 2px #3189dd, inset 0px -2px 2px #d4edf9, inset 2px 0px 2px #d4edf9, inset 0px 2px 2px #3189dd;
box-shadow: inset -2px 0px 2px #3189dd, inset 0px -2px 2px #d4edf9, inset 2px 0px 2px #d4edf9, inset 0px 2px 2px #3189dd;
} .progress_bar {
width: 0%;
height: 26px;
background: url("images/bar.jpg") repeat;
background-size: auto 100%;
border-radius: 5px;
position: relative;
left: 3px;
right: 3px;
top: 2px;
} p {
width: 300px;
text-align: center;
font-size: 14px;
color: #c20606;
position: absolute;
top: 98px;
}
</style>
<body onload="fakeProgress(0, load)">
<div style="height: 120px;"></div>
<div class="progress">
<div id=load>
<div class="progress_bar"></div>
<p>0</p>
</div>
</div>
<script type="text/javascript">
function setLOAD(v, el) {
var read = (document.all && document.getElementsByTagName);
if (read || document.readyState == "complete")
valueEl = el.children[1];
{
filterEl = el.children[0];
valueEl.innerText = v + "%";
filterEl.style.width = v + "%"; }
}
function fakeProgress(v, el) {
if (v > 100)
location.href = "begin.html";
else {
setLOAD(v, el);
window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 2000);
}
}
</script>
效果图:
js控制进度条到达100%跳转界面一的更多相关文章
- js控制进度条数据
<style><!-- #time{ width:500px; height: 20px; background: red; border-radius: 10px; } --> ...
- nprogress.js 头部进度条使用方法
nprogress.js 头部进度条 引入CSS\JS <link rel="stylesheet" type="text/css" href=" ...
- Js 百分比进度条
[构想] CSS3 + JS CSS3控制进度 利用CSS3中的 @keyframes JS实现百分比 根据CSS来调整,时间 [页面代码] 第一种: 默认直接进入就是下载 CSS代码 body { ...
- js 实现进度条功能。
/** * 纯js进度条 * Created by kiner on 15/3/22. */ function progress(options){ this.w = (options &&a ...
- C# 通过委托控制进度条以及多线程更新控件
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- js实现进度条
不多说,直接上代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...
- JS实现 进度条 不用控件
demo1 <html> <head> <title>进度条</title> <style type="text/css"&g ...
- js实现进度条效果
需求分析: 最近学习javascript客户端脚本语言,学到了两个定时器函数setInterval()和setTimeout(),回想起以前在网页上看到的进度条效果可以使用定时器来实现,所以完成了进度 ...
- 【Winform】使用BackgroundWorker控制进度条显示进度
许多开发者看见一些软件有进度条显示进度,自己想弄,项目建好后发现并没有自己想象中的那么简单...看了网上很多教程后,写了一个小Demo供网友们参考~~,Demo的网址:http://pan.baidu ...
随机推荐
- 解决Download interrupted: Connection to https://dl-ssl.google.com refused的问题
运行->drivers->etc->hosts 加入一行 74.125.237.1 dl-ssl.google.com ok! =================上述方法已经失效, ...
- couldn't set tty to ppp discipline invalid argument
参考: http://pptpclient.sourceforge.net/howto-diagnosis.phtml#conventions http://blog.chinaunix.net/ui ...
- CentOS下通过locale来设置字符集
转载:http://www.centoscn.com/CentOS/config/2013/1013/1784.html 在Centos中通过locale来设置程序运行的不同语言环境,locale由A ...
- c实例_挑战程序竞赛,蚂蚁
#include <stdio.h> //蚂蚁的题目 int max(int a,int b) { int count; count=a>b?a:b; return count; } ...
- B. Fox And Two Dots
B. Fox And Two Dots time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- Customer reviews on Lexia3 V48 diagnostic tool in EOBD2.FR
Robert said: Ok, so I bought a Lexia3 interface from EOBD2.FR in 2010. I have had no issues over the ...
- [Java,MVC] SpringMVC+Spring+hibernate 框架
转自:http://my.oschina.net/Thinkeryjgfn/blog/158951 1.准备的jar包以及配置文件如下: 2.新建一个JAVA web项目 3.建好以后出现以上包结构即 ...
- 记第一次web前端校招笔试
是的,我今晚跑到隔壁学校参加某电商公司的宣讲会+现场笔试.只有俩字可以形容:苦笑! 在寝室复习了下以前学习的关于前端方面的知识,重点是JavaScript,javaweb开发技术(jsp+servle ...
- 错误与修复:ASP.NET无法检测IE10,导致_doPostBack未定义JavaScript错误,恒处于FF5卷动条位置
浏览器版本号继续升级过程中.IE9诞生了,IE10 也即将问世,火狐5和6已经发布了,而7和8也快出现了,Opera已经到了11,Chrome还在继续,我也不知道,应该总在14和50之间吧.不管怎样, ...
- [改善Java代码]equals应该考虑null值的情景
建议46: equals应该考虑null值情景 继续上一建议的问题,我们解决了覆写equals的自反性问题,是不是就很完美了呢?再把main方法重构一下: public class Client { ...
