zoukankan      html  css  js  c++  java
  • 上下滚动字条

    css

    .gundong#demo {overflow: hidden; 90%;max 640px;height: 29px;line-height: 29px;color: #fe8d00;font-size: 14px;margin-left: 34px;}

    #up_zzjs { 100%;height: 29px;line-height: 29px;overflow: hidden;background: url(../img/righta.png)no-repeat 99%;background-size: 11px11px;}

    HTML

     <!--滚动-->
     <div class="gundong">
            <div class="gundongtext">
                小津提示
            </div>
            <div id="demo">
                <div id="up_zzjs">
                    <div id="marqueebox">
                        <div id="up_li"><a href="tj_washing_list.html">1元洗车,每周二准时开抢</a></div>
                        <div id="up_li"><a href="msh_list.html">天行【哏儿都惠】,大牌美食等你来</a></div>
                        <script language="javascript">
                            function startmarquee(lh, speed, delay) {
                                var p = false;
                                var t;
                                var o = document.getElementById("marqueebox");
                                o.innerHTML += o.innerHTML;
                                o.style.marginTop = 0;
                                o.onmouseover = function () { p = true; }
                                o.onmouseout = function () { p = false; }
                                function start() {
                                    t = setInterval(scrolling, speed);
                                    if (!p) o.style.marginTop = parseInt(o.style.marginTop) - 1 + "px";
                                }
                                function scrolling() {
                                    if (parseInt(o.style.marginTop) % lh != 0) {
                                        o.style.marginTop = parseInt(o.style.marginTop) - 1 + "px";
                                        if (Math.abs(parseInt(o.style.marginTop)) >= o.scrollHeight / 2) o.style.marginTop = 0;
                                    } else {
                                        clearInterval(t);
                                        setTimeout(start, delay);
                                    }
                                }
                                setTimeout(start, delay);
                            }
                            startmarquee(30, 20, 2000);
                        </script>
                    </div>
                </div>
            </div>
      </div>

  • 相关阅读:
    MSAA, UIA brief explanation
    《微软的软件测试之道》读书笔记 之 非功能测试
    《微软的软件测试之道》读书笔记 之 结构测试技术
    《软件测试方法和技术》 读书笔记
    Gumshoe
    ng-template
    script跨域之360搜索
    src与href的异同
    跨域
    js引入script
  • 原文地址:https://www.cnblogs.com/myRain/p/6046856.html
Copyright © 2011-2022 走看看