分享
 
 
 

载入信息动画 每次刷新效果还不一样啊

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>

<!-- http://www.webjx.com -->

<!-- bbs http://bbs.webjx.com -->

<!--完整的HTML文件如下:-->

<html>

<head>

<title>网页教学网-特效代码->>载入信息动画</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<style type="text/css">

.clDivs {position:absolute; width:30px; height:30px; left:0px; font-size:80px; font-weight:bold; font-family:arial black,arial,helvetica,sans-serif; color:#999999; visibility:hidden;}

</style>

<script language="JavaScript" type="text/javascript">

function lib_bwcheck(){

this.ver=navigator.appVersion

this.agent=navigator.userAgent

this.dom=document.getElementById?1:0

this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0

this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;

this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;

this.ie4=(document.all && !this.dom && !this.opera5)?1:0;

this.ie=this.ie4||this.ie5||this.ie6

this.mac=this.agent.indexOf("Mac")>-1

this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0;

this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)

return this

}

var bw=new lib_bwcheck()

numberOfLetters=13

ypos=-100

xpos=new Array()

xpos[0] = -380 //w

xpos[1] = -300 //w

xpos[2] = -220 //w

xpos[3] = -140 //.

xpos[4] = -110 //5

xpos[5] = -55 //1

xpos[6] = -5 //j

xpos[7] = 55 //s

xpos[8] = 115 //.

xpos[9] = 140 //c

xpos[10] = 200 //o

xpos[11] = 260 //m

xpos[12] = 320 //m

testing=0

animation=4

aspeed=10.

function makeObj(obj,speed,xmove,ymove,works){

this.el=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;

this.css=bw.dom || bw.ie4?this.el.style:bw.ns4?this.el:0;

this.moveIt=b_moveIt;

}

var px = bw.ns4||window.opera?"":"px";

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x+px; this.css.top=this.y+px;}

var posArray,oZdivs;

function introInit(){

pageXcenter = bw.op5||bw.ns4 ||bw.ns6?innerWidth/2:document.body.offsetWidth/2

pageYcenter = bw.op5||bw.ns4||bw.ns6?innerHeight/2:document.body.offsetHeight/2

oZdivs = new Array()

for(var i=0; i<numberOfLetters; i++){

oZdivs[i] = new makeObj('div'+i)

oZdivs[i].moveIt(-200,0)

oZdivs[i].css.visibility = "visible"

}

if (animation==4) animation = Math.round(Math.random()*2)+1

if (!testing) eval('anim'+animation+'(0)')

else testIt()

}

function testIt(){

alert(pageYcenter)

for(var i=0; i<oZdivs.length; i++){

oZdivs[i].moveIt((pageXcenter+xpos[i]),(pageYcenter+ypos))

}

}

xPath1 = new Array(-277,-271,-264,-255,-245,-234,-223,-210,-196,-181,-161,-134,-98,-52,1,53,98,131,151,156,147,124,92,59,0)

yPath1 = new Array(-240,-206,-162,-114,-64,-16,29,71,112,151,187,217,241,255,260,254,239,213,179,143,108,77,51,30,0)

function anim1(num,test){

if (num<oZdivs.length){

st = test?test:0;

animX(num,'xPath1','yPath1',aspeed,st,'anim1('+(num+1)+','+st+')')

}else endanim(0)

}

xPath2 = new Array(-285,-270,-255,-240,-225,-210,-195,-180,-165,-150,-135,-120,-105,-90,-75,-60,-45,-30,-15,0)

yPath2 = new Array(-353,-344,-335,-324,-312,-299,-285,-270,-254,-236,-218,-198,-177,-155,-132,-108,-83,-56,-29,0)

function anim2(num){

if (num<oZdivs.length){

animX(num,'xPath2','yPath2',aspeed,0,'anim2('+(num+1)+')')

}else endanim(0)

}

xPath3 = new Array(0,-2,-6,-13,-23,-36,-50,-66,-83,-100,-117,-134,-150,-164,-177,-187,-194,-198,-200,-198,-194,-187,-177,-164,-150,-134,-117,-100,-83,-66,-50,-36,-23,-13,-6,-2,0)

yPath3 = new Array(0,-17,-34,-50,-64,-77,-87,-94,-98,-100,-98,-94,-87,-77,-64,-50,-34,-17,0,17,34,50,64,77,87,94,98,100,98,94,87,77,64,50,34,17,0)

function anim3(num){

if (num<oZdivs.length){

animX(num,'xPath3','yPath3',aspeed,0,'anim3('+(num+1)+')')

}else endanim(0)

}

function animX(divnum,arrayX,arrayY,speed,num,fn){

arrayXr = new Array(); arrayYr = new Array()

arrayXr = eval(arrayX); arrayYr = eval(arrayY)

arrayX = "'"+arrayX+"'"; arrayY = "'"+arrayY+"'"

if (num<arrayXr.length){

oZdivs[divnum].moveIt(arrayXr[num]+(pageXcenter+xpos[divnum]),arrayYr[num]+(pageYcenter+ypos))

num ++;

setTimeout("animX("+divnum+","+arrayX+","+arrayY+","+speed+","+num+",'"+fn+"')",speed)

}else eval(fn)

}

function endanim(num){

if (num<oZdivs.length){

oZdivs[num].css.visibility = "hidden"

num ++

setTimeout("endanim("+num+")",300)

}else{

}

}

onload = introInit;

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<div id="div0" class="clDivs" style="left: 23px; top: 137px">w</div>

<div id="div1" class="clDivs" style="left: 101px; top: 137px">w</div>

<div id="div2" class="clDivs" style="left: 183px; top: 137px">w</div>

<div id="div3" class="clDivs" style="left: 287px; top: 137px">.</div>

<div id="div4" class="clDivs" style="left: 351px; top: 139px">w</div>

<div id="div5" class="clDivs" style="left: 431px; top: 137px">e</div>

<div id="div6" class="clDivs" style="left: 489px; top: 113px">b</div>

<div id="div7" class="clDivs" style="left: 506px; top: 125px">j</div>

<div id="div8" class="clDivs" style="left: 573px; top: 135px">x</div>

<div id="div9" class="clDivs" style="left: 603px; top: 144px">.</div>

<div id="div10" class="clDivs" style="left: 656px; top: 141px">c</div>

<div id="div11" class="clDivs" style="left: 701px; top: 163px">o</div>

<div id="div12" class="clDivs" style="left: 701px; top: 163px">m</div>

</body>

</html>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有