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>

  • 相关阅读:
    BZOJ2530 : [Poi2011]Party
    BZOJ3998 : [TJOI2015]弦论
    BZOJ3941 : [Usaco2015 Feb]Fencing the Herd
    BZOJ3939 : [Usaco2015 Feb]Cow Hopscotch
    搬家啦~
    BZOJ3837 : [Pa2013]Filary
    使用Privoxy做智能代理切换
    放弃iOS4,拥抱iOS5
    让Xcode的 stack trace信息可读
    改进iOS客户端的升级提醒功能
  • 原文地址:https://www.cnblogs.com/myRain/p/6046856.html
Copyright © 2011-2022 走看看