javascript - The revolving door effect was normal at first. After switching to other pages, after waiting for about a minute and coming back, I found that the list moved very quickly.
PHP中文网
PHP中文网 2017-05-19 10:14:24
0
1
502

<html>
<head>
<script src="http://apps.bdimg.com/libs/jq...
<style>

.lim_item{width:100%;border-bottom:1px solid blue;}

</style>
</head>
<body>
<p class="liMarquee" style="border: 1px solid red;width: 95px;height: 200px;overflow: hidden;">

            <p class="lim_item">
              <p class="lim_title">我是标题一</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题二</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题三</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题四</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题五</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题六</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题七</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题八</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题九</p>
            </p>
            <p class="lim_item">
              <p class="lim_title">我是标题十</p>
            </p>
            <p class="lim_item">
            <p class="lim_title">我是标题十一</p>
          </p>
          </p>

</body>
<script type="text/javascript">
var getMarqueeAnimate=function(){

            outerTimeId=setInterval(function(){
                var $Mcontainer=$('.liMarquee');
                $('.progress-ph').css('width','0');
                var height=$Mcontainer.find('.lim_item').height();
                m1=0;
                /*里面的控制*/
                innerTimeId=setInterval(function(){
                    $Mcontainer.scrollTop(++m1);
                    if(m1===height){
                        m1=0;
                        clearInterval(innerTimeId);
                        innerTimeId=null;
                        $Mcontainer.find('.lim_item:first').appendTo($Mcontainer);
                    }
                },10);
            },7000);
        }

getMarqueeAnimate();

</script>
</html>

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
Ty80

How late is it? I haven’t gotten any faster after observing it for a minute

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template