您的位置:首页 > 其它

Pageadmin如何实现滚动广告图片特效(二)

2010-03-01 23:33 447 查看
<tr align="center">
            <td height="50"><img height="50" alt="" width="200" src="/upload/FCKeditor/2009-12/01220956.gif" /></td>
        </tr>
        <tr align="center">
            <td height="50"><img height="50" alt="" width="200" src="/upload/FCKeditor/2009-12/01221020.bmp" /></td>
        </tr>
        <tr align="center">
            <td height="50"><img height="50" alt="" width="200" src="/upload/FCKeditor/2009-12/01220940.gif" /></td>
        </tr>
        <tr align="center">
            <td height="50"><img height="50" alt="" width="200" src="/upload/FCKeditor/2009-12/01220956.gif" /></td>
        </tr>
        <tr align="center">
            <td height="50"><img height="50" alt="" width="200" src="/upload/FCKeditor/2009-12/01221020.bmp" /></td>
        </tr>
        <tr align="center">
            <td height="50"><img height="50" alt="" width="200" src="/upload/FCKeditor/2009-12/01220940.gif" /></td>
        </tr>
    </tbody>
</table>
</div>
<div id="demo2"> </div>
</div>
<SCRIPT>
var speed=20
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.onmouseover=function() {clearInterval(MyMar);}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed);}
            </SCRIPT>

大小和图片位置自己设置就可以实现了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  function