当前位置:编程学习 > C#/ASP.NET >>

求滚动代码 代码

 求自下往上滚动代码 --------------------编程问答-------------------- <div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff><div id=demo1>
</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.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script> --------------------编程问答-------------------- 同意楼上 在懒人源码中搜 一大堆 --------------------编程问答-------------------- 还能这样啊,就是移植过来的话会出好多错 --------------------编程问答-------------------- 1.图片滚动代码:

<%-- 向右移动--%>
<%--    <script type="text/javascript">
  <!--
                        var speed = 1//速度数值越大速度越慢小于1不能滚动
                        demo2.innerHTML = demo1.innerHTML
                         demo.scrollLeft = demo1.offsetWidth
                        function Marquee() {
                            if (demo.scrollLeft <= 0)
                                demo.scrollLeft += demo1.offsetWidth
                            else {
                                demo.scrollLeft--
                            }
                        }
                        var MyMar = setInterval(Marquee, speed)
                        demo.onmouseover = function() { clearInterval(MyMar) }
                        demo.onmouseout = function() { MyMar = setInterval(Marquee, speed) }
-->
    </script>--%>
    
    
<%-- 向左移动--%>
 
  <script type="text/javascript">
  <!--
                        var speed = 1//速度数值越大速度越慢小于1不能滚动
                        demo2.innerHTML = demo1.innerHTML
                        function Marquee() {
                            if (demo2.offsetWidth - demo.scrollLeft <= 0)
                                demo.scrollLeft -= demo1.offsetWidth
                            else {
                                demo.scrollLeft++
                            }
                        }
                        var MyMar = setInterval(Marquee, speed)
                        demo.onmouseover = function() { clearInterval(MyMar) }
                        demo.onmouseout = function() { MyMar = setInterval(Marquee, speed) }
-->
    </script>


2.公告栏滚动代码:

    <MARQUEE id=srcolltext onmouseover=srcolltext.stop() style="FONT-SIZE: 9pt; LINE-HEIGHT: 15pt" onmouseout=srcolltext.start() scrollAmount=2 scrollDelay=100 direction=up 

height=120></MARQUEE> --------------------编程问答-------------------- 补充一下:需要那种循环滚动的代码。
4楼的代码 信息循环一次结束后。都有一定的空白。 --------------------编程问答-------------------- 没分下东西了,顶下拿点分
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,