进入页面时,系统会根据你所使用的浏览分辨率进行应的导航

王朝other·作者佚名  2008-05-31
宽屏版  字体: |||超大  

<!-- 把下列代码放到<head>区域中-->

<SCRIPT LANGUAGE="JavaScript">

if (document.all) {

yourLogo = "网页教学网欢迎您的光临";

logoFont = "宋体";

logoColor = "000000";

yourLogo = yourLogo.split('');

L = yourLogo.length;

TrigSplit = 360 / L;

Sz = new Array()

logoWidth = 100;

logoHeight = -30;

ypos = 0;

xpos = 0;

step = 0.03;

currStep = 0;

document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');

for (i = 0; i < L; i++) {

document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'

+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'

+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');

}

document.write('</div></div>');

function Mouse() {

ypos = event.y;

xpos = event.x - 5;

}

document.onmousemove=Mouse;

function animateLogo() {

outer.style.pixelTop = document.body.scrollTop;

for (i = 0; i < L; i++) {

ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);

ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);

Sz[i] = ie[i].style.pixelTop - ypos;

if (Sz[i] < 5) Sz[i] = 5;

ie[i].style.fontSize = Sz[i] / 1.7;

}

currStep -= step;

setTimeout('animateLogo()', 20);

}

window.onload = animateLogo;

}

</script>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有