时隐时现的导航菜单脚本

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

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

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

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

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

<html>

<head>

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

<style>

<!--

#tickertape{

position:relative;

layer-background-color:black;

width:400;

height:12;

; font-family: "宋体"; font-size: 9pt}

#subtickertape{

background-color:black;

position:absolute;

border: 1px solid black;

width:100;

height:12;

; font-family: "宋体"; font-size: 9pt

}

.subtickertapefont{

font:bold 9pt "宋体";

text-decoration:none;

color:white;

}

.subtickertapefont a{

color:white;

text-decoration:none;

; font-family: "宋体"; font-size: 9pt}

-->

</style>

<title>网页教学网特效代码->>隐现导航脚本</title>

</head>

<body onload="if (document.all||document.layers) {regenerate2();update()}">

<div id="tickertape">

<div id="subtickertape" class="subtickertapefont">初始化...</div>

</div>

<script language="JavaScript1.2">

//默认速度4.5秒,自己修改速度快慢。

var speed=4500

var news=new Array()

news[0]="<a href='index.htm'>本站首页</a>"

news[1]="<a href='index1.htm'>时间日期</a>"

news[2]="<a href='index2.htm'>网页导航</a>"

news[3]="<a href='index3.htm'>网页背景</a>"

news[4]="<a href='index4.htm'>页面特效</a>"

news[5]="<a href='index5.htm'>图形图象</a>"

news[6]="<a href='index6.htm'>鼠标事件</a>"

//显示的信息内容可以任意按照格式添加。

i=0

if (document.all)

tickerobject=document.all.subtickertape.style

else

tickerobject=document.tickertape.document

function regenerate(){

window.location.reload()

}

function regenerate2(){

if (document.layers)

setTimeout("window.onresize=regenerate",450)

}

function update(){

BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10);

if (document.layers){

document.tickertape.document.subtickertape.document.write('<span class="subtickertapefont">'+news[i]+'</span>')

document.tickertape.document.subtickertape.document.close()

}

else

document.all.subtickertape.innerHTML=news[i]

if (i<news.length-1)

i++

else

i=0

setTimeout("update()",speed)

}

function BgFade(red1, grn1, blu1, red2,

grn2, blu2, steps) {

sred = red1; sgrn = grn1; sblu = blu1;

ered = red2; egrn = grn2; eblu = blu2;

inc = steps;

step = 0;

RunFader();

}

function RunFader() {

var epct = step/inc;

var spct = 1 - epct;

if (document.layers)

tickerobject.bgColor =

Math.floor(sred * spct + ered *

epct)*256*256 +

Math.floor(sgrn * spct + egrn * epct)*256 +

Math.floor(sblu * spct + eblu * epct);

else

tickerobject.backgroundColor=

Math.floor(sred * spct + ered *

epct)*256*256 +

Math.floor(sgrn * spct + egrn * epct)*256 +

Math.floor(sblu * spct + eblu * epct);

if ( step < inc ) {

setTimeout('RunFader()',50);

}

step++;

}

</script>

</body>

</html>

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

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