简单的文字上下滚动

简介:三秒第一个元素执行一次margin-top负高度,然后将第一个元素appendTo添加至末尾

var notices = function(){

    var notice = $("#w-notices"),

        h = notice.height(),

        doplays = function(){

                var ele = notice.find('li').eq(0);

                ele.animate({'margin-top':'-' + h + 'px'},300,function(){

                    ele.appendTo(notice).css('margin-top',0);

                });
        },

        nothanld = setInterval(doplays,3000);


};
原文地址:https://www.cnblogs.com/naokr/p/5106265.html