zoukankan      html  css  js  c++  java
  • 文字上下滑动

    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
    .txt { 20px;margin:0 auto;}
    </style>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    </head>
    <body>

    <script type="text/javascript">
    $(function(){
    var textScroll = function(selector) {
    var stepTime = 1000, //动画执行时间
    intervalTime = stepTime * 2,
    $text = $(selector);
    $text.css("position","relative");
    setInterval(function(){
    $text.animate({
    top:'100px'}, stepTime, 'linear', function(){
    $text.animate({top:0}, stepTime)
    }
    )
    }, intervalTime);
    };
    textScroll (".box");
    // textScroll (".box");//增加用
    });

    </script>
    <div class="box">
    <div class="txt">
    我就是要上下跳动
    </div>
    </div>
    </body>
    </htm>

  • 相关阅读:
    mysql修改加密方式
    信息安全学习路线
    DNS域传送漏洞
    CSRF漏洞
    反序列化漏洞
    计算机通讯基础
    gorm gen使用
    golang makefile使用
    linux命令行录制
    go代码自动生成注释
  • 原文地址:https://www.cnblogs.com/warmth89/p/4458743.html
Copyright © 2011-2022 走看看