• 上下滚动字条


    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>

  • 相关阅读:
    装饰器模块和面试题
    装饰器和推导式
    设计商城系统,主要提供两个功能:商品管理、会员管理。
    写代码:三级菜单
    写代码:循环打印names列表,把元素和索引值都打印出来。
    写代码: 编写登录接口
    写代码:假设一年期定期利率为3.25%,计算一下需要过多少年,一万元的一年定期存款连本带息能翻番?
    写代码:输入一年份,判断该年份是否是闰年并输出结果。
    写代码:制作趣味模板程序
    变量n1和n2是什么关系
  • 原文地址:https://www.cnblogs.com/myRain/p/6046856.html
Copyright © 2020-2023  润新知