phpcms如何实现logo链接无缝滚动(2)_PHPCms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft
}
}
var MyMar=setInterval(Marquee,speed)

demo.on mouseover=function() {MyMar=clearInterval(MyMar)}
demo.on mouseout=function() {MyMar=setInterval(Marquee,speed)}
</script> 上滚动标签代码
{$linklist('tag_linklist-1',$channelid,1,0,20,5)}

CODE: [Copy to clipboard] <base href="http://www.cnser.net">
<div id=demo style=overflow:hidden;height:40;color:#ffffff>
<div id=demo1>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="mar_5">
<!-- 友情链接列表循环显示开始 -->
{loop $sites $i $site}
{if $i%$cols==0}
<tr>
{/if}
<td align="center">
<a href="{$site[url]}" title="{$site[name]}" target="_blank" class="friendsitelist">{$site[link]}</a>
</td>
{if $i%$cols==($cols-1)}
</tr>
{/if}
{/loop}
<!-- 友情链接列表循环显示结束 -->
</table>
</div>
<div id=demo2></div>
</div>
<script>
var speed=50;
demo2.innerHTML=demo1.innerHTML;
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight;
else{
demo.scrollTop ;
}
}
var MyMar=setInterval(Marquee,speed);
demo.on mouseover=function() {MyMar=clearInterval(MyMar)}
demo.on mouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>


查看更多 phpcms教程  phpcms模板

共2页上一页12下一页
来源:模板无忧//所属分类:PHPCms教程/更新时间:2007-01-29
相关PHPCms教程