找传奇、传世资源到传世资源站!

js新闻标题滚动

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

js新闻标题滚动 常用JavaScript方法-第1张<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/css">.inform {border: 1px solid #E5E5E5;padding: 1px;}.inform h2 {background: none repeat scroll 0 0 #015198;font-weight: normal;line-height: 30px;}.inform h2 span {color: #FFFFFF;font-size: 16px;padding-left: 10px;}.inform h2 a {color: #FFFFFF;float: right;font-size: 14px;padding-right: 3px;}.inform ul {height: 170px;margin-top: 7px;overflow: hidden;}.inform ul li {line-height: 26px;padding-left: 12px;}</style></head><body><div class="inform"><div style="height:170px; overflow:hidden"><ul id="marquee" style="height:285px"><li><a href=""> 1111111111111111111111111</a></li><li><a href=""> 2222222222222222222222222</a></li><li><a href=""> 3333333333333333333333...</a></li><li><a href=""> 44444444444444444444...</a></li><li><a href=""> 55555555555555555555555...</a></li><li><a href=""> 666666666666666</a></li><li><a href=""> 777777777777777777777</a></li><li><a href=""> 88888888888888888888</a></li><li><a href=""> 999999999999999999</a></li><li><a href=""> 101010011110101010101011</a></li><li><a href=""> aaaaaaaaaaaaaaaaaaaaaaaaaa</a></li><li><a href=""> bbbbbbbbbbbbbbbbbbbbbbbb</a></li><li><a href=""> cccccccccccccccccccc</a></li></ul></div><script type="text/javascript">window.onload = function() {setTimeout("startmarquee(34, 50, 0, 'marquee')", 1000);}function startmarquee(lh, speed, delay, id) {var t;var p = false;var o = document.getElementById(id);o.innerHTML = o.innerHTML o.innerHTML o.innerHTML;o.onmouseover = function() {p = true;}o.onmouseout = function() {p = false;}o.scrollTop = 0;function start() {t = setInterval(scrolling, speed);if (!p) o.scrollTop = 2;}function scrolling() {if (o.scrollTop % lh != 0) {o.scrollTop = 2;if (o.scrollTop >= o.scrollHeight / 2) o.scrollTop = 0;} else {clearInterval(t);setTimeout(start, delay);}}setTimeout(start, delay);}</script></div></body></html>

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复