亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

文字垂直滾動(dòng)之javascript代碼

 更新時(shí)間:2015年07月29日 17:54:01   作者:我是代碼努力  
這篇文章主要應(yīng)用javascript代碼實(shí)現(xiàn)文字垂直滾動(dòng)的效果,需要的朋友可以參考下

在大型的網(wǎng)站新聞公告和友情鏈接等領(lǐng)域經(jīng)常有這種文字或圖片垂直滾動(dòng)的效果,下面就介紹一下文字垂直滾動(dòng)的javascript代碼。

javascript代碼如下:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="http://chabaoo.cn/" />
<title>腳本之家</title>
<style> 
a { 
 display:block; 
 font-size:15px; 
 line-height:18px; 
 text-decoration:none; 
 color:#333; 
 font-family:Arial; 
 font-size:12px; 
} 
.main{ 
 background:no-repeat 4px 5px; 
 border:1px solid #aaa; 
 width:400px; 
 padding:3px 2px 2px 20px; 
} 
#thediv{ 
 height:36px; 
 overflow:hidden; 
} 
</style>
<script type="text/javascript">
var c, _ = Function;
window.onload=function(){ 
 with (o = document.getElementById("thediv")){ 
 innerHTML += innerHTML; onmouseover = _("c=1"); onmouseout = _("c=0");
 } 
 (F=_("if(#%18||!c)#++,#%=o.scrollHeight>>1;setTimeout(F,#%18?10:3000);".replace(/#/g,"o.scrollTop")))(); 
}
</script> 
</head> 
<body> 
<div class="main"> 
<div id="thediv"> 
 <a>螞蟻部落歡迎您</a> 
 <a>只有奮斗才會(huì)有好的結(jié)果</a> 
 <a>高手都是從菜鳥成長而來</a> 
 <a>太陽馬上就要出來了</a> 
 </div> 
</div> 
</body> 
</html>

以上代碼就實(shí)現(xiàn)了文字垂直滾動(dòng)的效果,文字可有上下間歇性的滾動(dòng),有需要的朋友可以來參考下,希望大家喜歡。

相關(guān)文章

最新評(píng)論