zoukankan      html  css  js  c++  java
  • JS文字翻滚效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>JS新闻文字翻滚效</title>
    <style>
    a{display:block;font-size:15px;line-height:18px;text-decoration:none;color:#333}
    .shell{
    1122123<img src=http://p1.mb5u.com/texiao/2/20100522231053292.gif>2244234background:url(http://p1.mb5u.com/texiao/2/20100522231053292.gif) no-repeat 4px 5px;
    border:1px solid #aaa;
    386px;
    padding:3px 2px 2px 25px;
    }
    .core{
    height:18px;
    overflow:hidden;
    }
    </style>
    </head>
    <body>
    <!--<div class="shell">
    <div id="div1" class="core">
    <a href="javascript:">jQuery 无刷新切换CSS样式表改变风格</a>
    <a href="javascript:">VC++生成随机数并快速排序的算法</a>
    <a href="javascript:">基于jQuery的图片滚动切换插件</a>
    <a href="javascript:">联想头部大横幅Flash广告附源文件</a>
    <a href="javascript:">VB开发的Eclipse编程软件完整版</a>
    </div>
    </div>-->
    <p></p>
    <div class="shell">
    <div id="div2" class="core">
    <a href="javascript:">jQuery 无刷新切换CSS样式表改变风格</a>
    <a href="javascript:">VC++生成随机数并快速排序的算法</a>
    <a href="javascript:">基于jQuery的图片滚动切换插件</a>
    <a href="javascript:">联想头部大横幅Flash广告附源文件</a>
    <a href="javascript:">VB开发的Eclipse编程软件完整版</a>
    </div>
    </div>
    <p></p>
    <div class="shell">
    <div id="div3" class="core">
    <a href="javascript:">jQuery 无刷新切换CSS样式表改变风格</a>
    <a href="javascript:">VC++生成随机数并快速排序的算法</a>
    <a href="javascript:">基于jQuery的图片滚动切换插件</a>
    <a href="javascript:">联想头部大横幅Flash广告附源文件</a>
    <a href="javascript:">VB开发的Eclipse编程软件完整版</a>
    </div>
    </div>
    <p></p>
    <div class="shell">
    <div id="div4" class="core">
    <a href="javascript:">jQuery 无刷新切换CSS样式表改变风格</a>
    <a href="javascript:">VC++生成随机数并快速排序的算法</a>
    <a href="javascript:">基于jQuery的图片滚动切换插件</a>
    <a href="javascript:">联想头部大横幅Flash广告附源文件</a>
    <a href="javascript:">VB开发的Eclipse编程软件完整版</a>
    </div>
    </div>
    <p></p>
    <div class="shell">
    <div id="div5" class="core">
    <a href="javascript:">jQuery 无刷新切换CSS样式表改变风格</a>
    <a href="javascript:">VC++生成随机数并快速排序的算法</a>
    <a href="javascript:">基于jQuery的图片滚动切换插件</a>
    <a href="javascript:">联想头部大横幅Flash广告附源文件</a>
    <a href="javascript:">VB开发的Eclipse编程软件完整版</a>
    </div>
    </div>
    </body>
    <script>
    function myGod(id,w,n){
    var box=document.getElementById(id),can=true,w=w||1500,fq=fq||10,n=n==-1?-1:1;
    box.innerHTML+=box.innerHTML;
    box.onmouseover=function(){can=false};
    box.onmouseout=function(){can=true};
    var max=parseInt(box.scrollHeight/2);
    new function (){
    var stop=box.scrollTop%18==0&&!can;
    if(!stop){
    var set=n>0?[max,0]:[0,max];
    box.scrollTop==set[0]?box.scrollTop=set[1]:box.scrollTop+=n;
    };
    setTimeout(arguments.callee,box.scrollTop%18?fq:w);
    };
    };
    //myGod('div1',10);
    myGod('div2',10,-1);
    myGod('div3',500,-1);
    myGod('div4',500);
    myGod('div5',1500,-1);
    </script>
    </html>

  • 相关阅读:
    python绘图02
    python验证码
    Python绘图
    idea maven web项目tomcat本地部署
    Spark入门之环境搭建
    假期计划
    This program may be freely redistributed under the terms of the GNU GPL
    大学生恋爱观调查报告
    Python数据分析TMDb 5000 Movie Database电影数据分析
    动态添加HTML时onclick函数参数传递
  • 原文地址:https://www.cnblogs.com/seven077/p/9454554.html
Copyright © 2011-2022 走看看