网页加载特效
来源:互联网 发布:黑客也是程序员 编辑:程序博客网 时间:2024/06/05 05:14
<script language="JavaScript" type="text/javascript">
var t_id = setInterval(animate,20);
var pos=0;
var dir=2;
var len=0;
function animate()
{
var elem = document.getElementById('progress');
if(elem != null) {
if (pos==0) len += dir;
if (len>32 || pos>79) pos += dir;
if (pos>79) len -= dir;
if (pos>79 && len==0) pos=0;
elem.style.left = pos;
elem.style.width = len;
}
}
function remove_loading() {
this.clearInterval(t_id);
var targelem = document.getElementById('loader_container');
targelem.style.display='none';
targelem.style.visibility='hidden';
}
</script>
<style>
#loader_container {
text-align:center;
position:absolute;
top:40%;
width:100%;
left: 0;
}
#loader {
font-family:Tahoma, Helvetica, sans;
font-size:11.5px;
color:#000000;
background-color:#FFFFFF;
padding:10px 0 16px 0;
margin:0 auto;
display:block;
width:130px;
border:1px solid #5a667b;
text-align:left;
z-index:2;
}
#progress {
height:5px;
font-size:1px;
width:1px;
position:relative;
top:1px;
left:0px;
background-color:#8894a8;
}
#loader_bg {
background-color:#e4e7eb;
position:relative;
top:8px;
left:8px;
height:7px;
width:113px;
font-size:1px;
}
</style>
<body onLoad="remove_loading();">
<div id="loader_container">
<div id="loader">
<div align="center">页面正在加载中 ...</div>
<div id="loader_bg"><div id="progress"> </div></div>
</div>
</div>
</body>
var t_id = setInterval(animate,20);
var pos=0;
var dir=2;
var len=0;
function animate()
{
var elem = document.getElementById('progress');
if(elem != null) {
if (pos==0) len += dir;
if (len>32 || pos>79) pos += dir;
if (pos>79) len -= dir;
if (pos>79 && len==0) pos=0;
elem.style.left = pos;
elem.style.width = len;
}
}
function remove_loading() {
this.clearInterval(t_id);
var targelem = document.getElementById('loader_container');
targelem.style.display='none';
targelem.style.visibility='hidden';
}
</script>
<style>
#loader_container {
text-align:center;
position:absolute;
top:40%;
width:100%;
left: 0;
}
#loader {
font-family:Tahoma, Helvetica, sans;
font-size:11.5px;
color:#000000;
background-color:#FFFFFF;
padding:10px 0 16px 0;
margin:0 auto;
display:block;
width:130px;
border:1px solid #5a667b;
text-align:left;
z-index:2;
}
#progress {
height:5px;
font-size:1px;
width:1px;
position:relative;
top:1px;
left:0px;
background-color:#8894a8;
}
#loader_bg {
background-color:#e4e7eb;
position:relative;
top:8px;
left:8px;
height:7px;
width:113px;
font-size:1px;
}
</style>
<body onLoad="remove_loading();">
<div id="loader_container">
<div id="loader">
<div align="center">页面正在加载中 ...</div>
<div id="loader_bg"><div id="progress"> </div></div>
</div>
</div>
</body>
- 网页加载特效
- 为网站添加”网页加载中”特效
- JQuery 模拟youtube的网页加载特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 网页特效
- 一个项目包含两个Main函数编辑方式
- 微软收购雅虎要中国政府审批?
- Eclipse + MyEclipse + Tomcat + Jboss配置或者部署
- Blogged.com 推出博客分类目录服务
- 常见端口详解及部分攻击策略
- 网页加载特效
- 本人2007-2008学年 第二学期 执教班级和课程清单
- java:log4j学习(5)-转帖:Log4j基本使用方法
- java:log4j学习(6)-转帖:log4j使用示例
- 优秀的Web开源报表工具Cewolf上手
- 无线WIFI应用
- 在Virtual PC 2007虚拟机上安装ubuntu 7.04
- MFC-消息映射和消息传递
- C++ 中的 explicit