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>

  • 相关阅读:
    请求headers处理
    requests模块
    urllib3
    urllib
    百度AI搜索引擎
    CSS层叠样式表--使用
    学习requests_html
    聚合新闻头条
    爬虫工程师的月薪如何?
    Linux日志系统
  • 原文地址:https://www.cnblogs.com/warmth89/p/4458743.html
Copyright © 2011-2022 走看看