js实现列表从下往上循环滚动

html:

<div class="liscorll">
  <ul>

    <li>内容</li>

  </ul>
</div>

js:

/* 通知-滚动条 */
var doscroll = function(){
var $parent = $('.liscorll ul');
var $first = $parent.find('li:first');
var height = $first.height();
$first.animate({
height: 0 //或者改成: marginTop: -height + 'px'
}, 500, function() {// 动画结束后,把它插到最后,形成无缝
$first.css('height', height).appendTo($parent);
// $first.css('marginTop', 0).appendTo($parent);
});
};
setInterval(function(){doscroll()}, 3000);

原文地址:https://www.cnblogs.com/shoolnight/p/7543840.html