简单的文字渐渐显效果

<HTML> 

<style> 

<!-- 

#ticker 

  width:800px; 

  line-height:1.2em; 

  background-color:lightblue; 

--> 

</style> 

<script language="JavaScript1.2"> 

//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)//设置内容显示 

var tickercontents=new Array() 

tickercontents[0]='See what/'s New at Dynamic Drive. <a href=http://www.alixixi.com">[Read more]</a>' 

tickercontents[1]='Browse the most popular scripts on Dynamic Drive <a href=http://www.alixixi.com/down/">[Read more]</a>' 

tickercontents[2]='Link back to Dynamic Drive! <a href=http://www.alixixi.com/dev/">[Read more]</a>' 

 

//configure the below variable to determine the delay between ticking of messages (in miliseconds//设置延迟时间 

var tickdelay=3000 

 

Do not edit pass this line 

 

var currentmessage=0 

 

function changetickercontent(){ 

ticker.innerHTML=tickercontents[currentmessage] 

 

if (currentmessage==tickercontents.length-1) currentmessage=0 

else currentmessage++ 

setTimeout("changetickercontent()",tickdelay) 

 

function start_ticking(){ 

  changetickercontent() 

 

window.οnlοad=start_ticking 

</script> 

<div id="ticker"left=0 top=0></div> 

</HTML>

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值