phpcms如何实现logo链接无缝滚动(2)_PHPCms教程
教程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教程-phpcms如何实现logo链接无缝滚动(2)。