zoukankan      html  css  js  c++  java
  • 纵向文字滚动代码,带上下图片控制的。鼠标放到上下图片上时滚动

    <style type="text/css">
    #swsh .swsh_body{height:352px;overflow:hidden;}</style></p>
    <div id="swsh">
    <script language="javascript">
        var UDMoveflag=true
        function scrollStart(object,offset){
        object.scrollTop+=offset 
        if (UDMoveflag) timeID=window.setTimeout("scrollStart("+object.id+","+offset+")",10)
            if (object.scrollHeight<= (object.scrollTop+object.offsetHeight)){
                down.style.color="#444444"
            }else{
                down.style.color="#C11020"
            }
            if (object.scrollTop==0){
                up.style.color="#444444"
            }else{
                up.style.color="#C11020"
            }
        }
        function scrollStop(){
            UDMoveflag=false
            window.clearTimeout(timeID)
            UDMoveflag=true 
        }
    </script>
    <div><img height="10" alt="" width="17" id="up" onmouseover="scrollStart(RightMove1,-1)" onmouseout="scrollStop()" src="images/1G353K27-0.jpg" /></div>
    <div class="swsh_body" id="RightMove1" style="overflow: hidden">fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    fsdfsf<br />
    &nbsp;</div>
    <div><img height="10" alt="" width="17" id="down" onmouseover="scrollStart(RightMove1,1)" onmouseout="scrollStop()" src="images/1G353J24-1.jpg" /></div>
    </div>
  • 相关阅读:
    面试题12:打印1到最大的n位数
    java生成指定范围的随机数
    排序
    Java中的String类和算法例子替换空格
    动态规划、贪心算法笔记
    牛客编程巅峰赛S1第2场
    UVA 489
    UVA 1339
    UVA 1587
    UVA 202
  • 原文地址:https://www.cnblogs.com/whlives/p/3880898.html
Copyright © 2011-2022 走看看