發(fā)些滾動的代碼_風(fēng)訊Cms教程
<table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="78"><DIV id=icefable1>
<TABLE cellSpacing=0 cellPadding=0 width=246 border=0 cellspcing="0">
<TBODY>
<TR>
<TD align="center">{FS400_推薦滾動}<TD></TR></TBODY></TABLE>
</DIV>
<SCRIPT>
marqueesHeight=60;
stopscroll=false;
with(icefable1){
style.width=246;
style.height=marqueesHeight;
style.overflowX='visible';
style.overflowY='hidden';
noWrap=true;
onmouseover=new Function('stopscroll=true');
onmouseout=new Function('stopscroll=false');
}
preTop=0; currentTop=30; stoptime=0;
icefable1.innerHTML =icefable1.innerHTML;
function init_srolltext(){
icefable1.scrollTop=0;
setInterval('scrollUp()',20);//滾動速度
}init_srolltext();
function scrollUp(){
if(stopscroll==true) return;
currentTop =1;
if(currentTop==60) //滾動距離
{
stoptime =1;
currentTop-=1;
if(stoptime==60) //滾動間距
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=icefable1.scrollTop;
icefable1.scrollTop =1;
if(preTop==icefable1.scrollTop){
icefable1.scrollTop=120;
icefable1.scrollTop =1;
}
}
}
</SCRIPT></td>
</tr>
</table>
2、間歇性滾動js代碼間歇性滾動js代碼
<DIV id=icefable1>
<p>放被循環(huán)內(nèi)容</p>
<p>9999999999</p>
<p>0000000000 </p>
</DIV>
<DIV id=icefable2 style="Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute"></DIV>
<SCRIPT>
marqueesHeight=90;
stopscroll=false;
icefable1.scrollTop=0;
with(icefable1){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
preTop=0; currentTop=0; stoptime=0;
function init_srolltext(){
icefable2.innerHTML="";
icefable2.innerHTML =icefable1.innerHTML;
- 最簡單的欄目切換方法(樣式系列之欄目切換篇2)
- 我也放個(gè)欄目切換代碼,簡簡單單的。
- 搜狐女性頻道幻燈效果(幻燈系列之flash特效篇)
- 有效控制新聞內(nèi)容的圖片的尺寸
- 現(xiàn)提供增加<目錄生成規(guī)則>的方法!
- 風(fēng)訊里面上下篇標(biāo)簽DIV模式下浮動的解決方法!
- 風(fēng)訊目錄路徑自由選擇的實(shí)現(xiàn)方法
- 新聞列表讀取內(nèi)容時(shí)去掉html代碼
- 添加文字廣告的解決方案!
- 標(biāo)題下的分隔線在4.0中如何設(shè)置,還有標(biāo)題的行間距
- 隨時(shí)更換模版、廣告等,無須重新生成整站,共享出來供討論
- 3.1-讓圖片新聞中的標(biāo)題居中
- 相關(guān)鏈接:
- 教程說明:
風(fēng)訊Cms教程-發(fā)些滾動的代碼
。