图文资讯中的图片自动滚动,虽然DedecmsV5.6已经是滚动的了,但是图片滚动的并不是连续的。

打开首页模版,找到图文资讯附近,直接用下面的覆盖就可以了

<divclass="picnews">

<dlclass="tboxlight">

<dtclass=’light’><strong>图文资讯</strong></dt>

<ddclass=’light’>



<tablewidth="680"height="141"border="0"align="center"cellpadding="0"cellspacing="0">

<tr>

<tdvalign="middle">

<divid="left"style="overflow:hidden;width:680px;">



<tablecellpadding="0"cellspacing="0"border="0"align="center">

<tr>

<tdheight="100%"align="center"valign="middle"id="left1">



<tablecellpadding="0"cellspacing="0"border="0">

<tralign="center">



<ulclass="e1">

{dede:arclistrow=5orderby=pubdatetype=’image.’imgwidth=’124′imgheight=’94′}

<td>

<li><ahref="[field:arcurl/]">[field:image/]<spanclass="title">[field:title/]</span></a></li>

</td>



{/dede:arclist}

</ul>

</tr>

</table>



</td>

<tdid="left2"valign="middle"align="center"></td>

</tr>

</table>



</div>

<script>

varspeed=30//速度数值越大速度越慢

left2.innerHTML=left1.innerHTML

functionMarquee3(){

if(left2.offsetWidth-left.scrollLeft<=0)

left.scrollLeft-=left1.offsetWidth

else{

left.scrollLeft++

}

}

varMyMar3=setInterval(Marquee3,speed)

left.onmouseover=function(){clearInterval(MyMar3)}

left.onmouseout=function(){MyMar3=setInterval(Marquee3,speed)}

</script>

</td>

</tr>

</table>



</dd>

</dl>

</div>

<!–/picnews–>



使用方法:打开默认模板index.html(位置:/templets/default),找到



<divclass="picnews">

<dlclass="tboxlight">

<dtclass=’light’><strong>图文资讯</strong></dt>

<ddclass=’light’>

<ulclass="e1">{dede:arclistrow=5orderby=pubdatetype=’image.’imgwidth=’124′imgheight=’94′}

<li><ahref="[field:arcurl/]">[field:image/]<spanclass="title">[field:title/]</span></a></li>{/dede:arclist}

</ul>

</dd>

</dl>

</div>

<!–/picnews–>



直接用上面提供的代码替换这部分代码即可。