Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 这个走马灯如何改成垂直向

[复制链接]
AppKey 发表于 2013-11-19 10:59:08 | 显示全部楼层 |阅读模式
  1. <div id="colee_left" style="overflow:hidden;width:100%;" class="module cl ml">
  2. <table cellpadding="0" cellspacing="0" border="0">
  3. <tr><td id="colee_left1" valign="top" align="center">
  4. <table cellpadding="2" cellspacing="0" border="0">
  5. <tr align="center">
  6. <ul>
  7. [loop]
  8. <td>
  9. <li style="width: {picwidth}px;">
  10. <a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" alt="{title}" /></a>
  11. <p><a href="{url}" title="{title}"{target}>{title}</a></p>
  12. </li></td>
  13. [/loop]                  
  14. </ul>
  15. </tr>
  16. </table>
  17. </td>
  18. <td id="colee_left2" valign="top"></td>
  19. </tr>
  20. </table>
  21. </div>
  22. <script>
  23. var speed=30//速度数值越大速度越慢
  24. var colee_left2=document.getElementById("colee_left2");
  25. var colee_left1=document.getElementById("colee_left1");
  26. var colee_left=document.getElementById("colee_left");
  27. colee_left2.innerHTML=colee_left1.innerHTML
  28. function Marquee3(){
  29. if(colee_left2.offsetWidth-colee_left.scrollLeft<=0)
  30. colee_left.scrollLeft-=colee_left1.offsetWidth
  31. else{
  32. colee_left.scrollLeft++
  33. }
  34. }
  35. var MyMar3=setInterval(Marquee3,speed)
  36. colee_left.onmouseover=function() {clearInterval(MyMar3)}
  37. colee_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
  38. </script>
复制代码


 楼主| AppKey 发表于 2013-11-20 14:02:54 | 显示全部楼层
自己顶一下
回复

使用道具 举报

pole1010 发表于 2013-11-20 15:32:25 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| AppKey 发表于 2013-11-20 18:14:14 | 显示全部楼层
pole1010 发表于 2013-11-20 15:32
垂直跑馬燈語法
演示右下角
http://121.54.171.193/~pole1010/upload/forum-69-1.html

人好 技术好 谢谢!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-7-7 04:46 , Processed in 0.095226 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表