zoukankan      html  css  js  c++  java
  • 无缝上下滚动轮播图

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
        </head>
        <style>
            *{
                margin:0;
                padding:0;
            }
            #container{
                height:170px;
                500px;
                background:teal;
                margin:200px;
                overflow:hidden;
                position:relative;
            }
            #box{
                position:absolute;
                left:0;
                top:0;
            }
            ul{
                list-style:none;    
            }
        </style>
        <body>
            <div id="container">
                <div id="box">
                    <ul>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油11</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了...</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了累了...</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了...</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油10</li>
                    </ul>
                    <ul>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油11</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了...</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了累了...</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了...</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油1</li>
                        <li>好好学习天天向上,困了累了想想mm,想想sg,加油10</li>
                    </ul>
                </div>
            </div>
        </body>
    </html>
    <script src="../public.js"></script>
    <script>
        var timer = null;
        var num = 0;
        timer = setInterval( function(){
            num--;
            $id("box").style.top = num + "px";
            if( num < -( $id("box").children[0].offsetHeight ) ){
                num = 0;
            }
        },30 )
    </script>
  • 相关阅读:
    排序算法-总览
    MySQL插入大批量测试数据
    【剑指offer】面试的流程
    并发编程-内置锁
    并发编程-使用线程安全类
    规约先行-(二十一)设计规约
    规约先行-(二十)服务器
    [转]web.xml什么时候被加载进内存的
    DOM和BOM的理解
    代理&反向代理
  • 原文地址:https://www.cnblogs.com/tis100204/p/10328844.html
Copyright © 2011-2022 走看看