JS+CSS仿魔兽游戏进入进度条特效
来源:互联网 发布:手机扫描软件下载 编辑:程序博客网 时间:2024/04/30 21:39
<html>
<head>
<title>落日赌城</title>
</head>
<body>
</body>
<script type="text/jscript">
function DoubleAnimation(target,targetProperty,from,to,Duration)
{
this.Begin=function anonymous()
{
target[targetProperty]=from;
var starttime=new Date();
setTimeout(StoryBoard(),1);
function StoryBoard()
{
return function()
{
var now=new Date();
var d=now.getTime()-starttime.getTime();
target[targetProperty]=Math.round(from+(to-from)*d/Duration);
if(d<Duration)setTimeout(StoryBoard(),10);
}
}
}
this.setTo=function(val){to=val;}
this.setFrom=function(val){from=val;}
}
function ProgressBar(ID)
{
document.write( "<div id=\""+ID+"\" style=\"position:absolute;top:199;width:100; left: 108px;\"><image src=\"/images/20110805/pb_empty.jpg\" style=\"position: absolute;left: 84px; top: 137px;\" /><div id=\""+ID+"pb\" style=\"position: absolute; left: 106px; top: 143px;z-index:5;overflow:hidden;width:130;\" ><img src=\"/images/20110805/pb_full3.jpg\"/><div id=\""+ID+"highlight\" style=\"background:#ffffff;left: -500px; position: absolute; top: -1px;width:100;height:20;filter:Alpha(Opacity=75,FinishOpacity=0,Style=2)\"></div></div><div style=\"position:absolute;top:83px;width:180px; left: 148px;\">加载中请稍候……</div></div>");
document.write("<div id='light' style=\"position: absolute;height:10;width:20;left:1000;top:334;background:#aaccff;filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='10')progid:DXImageTransform.Microsoft.Alpha(opacity=50);\"></div>");
var story=new DoubleAnimation(document.getElementById(ID+"highlight").style,"left",-100,324,2000)
this.set=function(percentage)
{
document.getElementById(ID+"pb").style.width=Math.round(percentage*410/100);
document.getElementById("light").style.left=Math.round(percentage*410/100)+194;
document.getElementById("light").filters[1].opacity=percentage%100;
}
}
//演示
var pb1=new ProgressBar("ok");
var p=0;
function loading()
{
pb1.set(p+=0.1);
if(p<100)setTimeout(loading,10);
}
loading()
</script>
<br />
</html>
<head>
<title>落日赌城</title>
</head>
<body>
</body>
<script type="text/jscript">
function DoubleAnimation(target,targetProperty,from,to,Duration)
{
this.Begin=function anonymous()
{
target[targetProperty]=from;
var starttime=new Date();
setTimeout(StoryBoard(),1);
function StoryBoard()
{
return function()
{
var now=new Date();
var d=now.getTime()-starttime.getTime();
target[targetProperty]=Math.round(from+(to-from)*d/Duration);
if(d<Duration)setTimeout(StoryBoard(),10);
}
}
}
this.setTo=function(val){to=val;}
this.setFrom=function(val){from=val;}
}
function ProgressBar(ID)
{
document.write( "<div id=\""+ID+"\" style=\"position:absolute;top:199;width:100; left: 108px;\"><image src=\"/images/20110805/pb_empty.jpg\" style=\"position: absolute;left: 84px; top: 137px;\" /><div id=\""+ID+"pb\" style=\"position: absolute; left: 106px; top: 143px;z-index:5;overflow:hidden;width:130;\" ><img src=\"/images/20110805/pb_full3.jpg\"/><div id=\""+ID+"highlight\" style=\"background:#ffffff;left: -500px; position: absolute; top: -1px;width:100;height:20;filter:Alpha(Opacity=75,FinishOpacity=0,Style=2)\"></div></div><div style=\"position:absolute;top:83px;width:180px; left: 148px;\">加载中请稍候……</div></div>");
document.write("<div id='light' style=\"position: absolute;height:10;width:20;left:1000;top:334;background:#aaccff;filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='10')progid:DXImageTransform.Microsoft.Alpha(opacity=50);\"></div>");
var story=new DoubleAnimation(document.getElementById(ID+"highlight").style,"left",-100,324,2000)
this.set=function(percentage)
{
document.getElementById(ID+"pb").style.width=Math.round(percentage*410/100);
document.getElementById("light").style.left=Math.round(percentage*410/100)+194;
document.getElementById("light").filters[1].opacity=percentage%100;
}
}
//演示
var pb1=new ProgressBar("ok");
var p=0;
function loading()
{
pb1.set(p+=0.1);
if(p<100)setTimeout(loading,10);
}
loading()
</script>
<br />
</html>
- JS+CSS仿魔兽游戏进入进度条特效
- JS+CSS仿魔兽游戏进入进度条特效
- Div+Css+Js特效
- js+css表格特效
- js+css特效菜单栏
- js操作css特效
- js/css特效
- css+js 进度条 .
- html css js 进度条
- DIV+CSS+JS仿Select下拉表单网页特效源代码下载
- DIV+CSS+JS仿Select下拉表单网页特效源代码下载
- jquery仿flash引导页面进度条加载特效
- js特效-渐现进入菜单、窗口
- 仿HTML5 CSS "标签云"特效-优化效率版
- CSS+JS实现网页(图片)特效
- [转贴]CSS+JS实现网页(图片)特效
- (三) 使用JS实现CSS特效
- 简单css+js动态加载特效
- Mono.Cecil 和MVC匿名用法
- Silverlight Release History
- ASP.NET读取XML文件4种方法
- Tween Animation学习<转>
- 代码注释的格式
- JS+CSS仿魔兽游戏进入进度条特效
- SQL0964C The transaction log for the database is full (DB2 事务 日志满 清理 )
- 通过Word查看ASCII码和UNICODE码
- js调试悲剧多多
- HTTP请求错误400、401、402、403、404、405、406、407、412、414、500、501、502解析
- NSIS配置windows环境变量
- 数据库管理员-DBA简单介绍
- moss webservice调用(Moss自带的webservice)
- spring cve-2010-1622 exploit