当前位置: 主页->网页特效专栏->页面导航->隐现导航脚本
栏目导航
网页特效
  典型特效 状态栏
  游戏类 页面背景
  页面特效 页面导航
  文本操作 文本特效
  图形特效 鼠标特效
  时间日期 密码类
  浏览相关 警告对话
  技巧类 计数转换
  测试搜索 代码生成
  播放音乐 按钮特效
  系统相关 链接特效
  黑客性质 相关特效
  窗口特效 其它特效
最新更新
 
 
 
 
 
 
 
 
 
 
热点文章
 
 
 
 
 
 
 
 
 
 

隐现导航脚本

夜鹰电脑教学网 加入日期:2005-04-09 22:45:00 点击数:

查看:[大字体 中字体 小字体]

说明: 隐现导航脚本

效果: 点这里看效果!

代码:


<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='/webpage/'>网页制作</a>"
news[2]="<a href='/js/'>网页特效</a>"
news[3]="<a href='http://www.yy0736.com/graphics/index.html'>图像处理</a>"
news[4]="<a href='/flash'>Flash</a>"
news[5]="<a href='/school/'>夜鹰网校</a>"
news[6]="<a href='http://www.yy0736.com/messageboard/index.asp?user=bullbat'>给我留言</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>

作者:佚名 来源: 网上转帖  

   

上篇:关联菜单 (爽)   下篇:树形菜单


[夜鹰论坛] [我要留言] [关闭窗口] [ ][TOP]

此文章最新评论(不超过十条)
■评论此文章 ( 有问题请去夜鹰论坛发帖 )
共有评论: 查看全部评论 姓名:
【 声明 】 您所发表的言论将被众多网友阅读,因此,您所发表的言论应不违反中国法律,不违背一般的道德原则,否则,您必须对您的不当言论引发的一切不良后果负责;此外,我们的管理员有权删除您发表的不当言论,谢谢合作!