首 页免费资源建站技术源码下载软件下载精品淘吧客户留言
用户登陆 | 用户注册
您当前的位置:笃志小屋建站技术特效代码页面导航 → 文章内容
一个很靓的导航
作者:佚名  来源:不详  发布时间:2007-9-29 22:56:30

一个很靓的导航



<!-- 要实现此效果需要 3 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

><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:400;
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>




<!-- 第 2 步: -->
<!-- 把<BODY>中的属性代码改为: -->

<BODY bgcolor="#000000" onload="if (document.all||document.layers) {regenerate2();update()}">



<!-- 第 3 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

><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='http://www.webasp.net' target=_blank>1</a>"
news[1]="<a href='http://www.webasp.net' target=_blank>2</a>"
news[2]="<a href='http://www.webasp.net' target=_blank>3</a>"
news[3]="<a href='http://www.webasp.net' target=_blank>4</a>"
news[4]="<a href='http://www.webasp.net' target=_blank>5</a>"
news[5]="<a href='http://www.webasp.net' target=_blank>6</a>"
news[6]="<a href='http://www.webasp.net' target=_blank>7</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>
2007-9-29 22:56:30免费资源duzhi.net

[ ] [返回上一页] [打 印]

【笃志小屋duzhi.net】

  技术文章导航
  技术文章排行
  精彩推荐
Copyright www.duzhi.net All Right Reserved.
设计制作:翼迅设计室 Equick Desgin Home 在线QQ:303471038
网络备案号:冀ICP备06008201号 站长信箱:webmaster#duzhi.net(将#换为@)
本站部分文章和图片来源于网络和内容提供伙伴,如果侵犯了您的权利,请留言告知,本站定会及时删除相关文件!