最终效果图
源代码:
function scroll_news(){
var $firstNode = $('#scroll-container li');
//得到 i的值 列数
var iRow = $('#scroll-container').find('li').length – 1;
//debugger;
$(function(){
$firstNode.eq(0).fadeOut('slow',function(){
$(this).clone().appendTo($(this).parent()).fadeIn('slow');
$(this).remove();
$firstNode.eq(iRow).hide();
});
});
}
$(document).ready(function(){
go();
});
function stop(){
clearInterval(sn);
}
function go(){
sn = setInterval('scroll_news()',2000);
}
#scroll-container{border:1px #000 solid;background:#FEC;height:23px;line-height:23px;}
#scroll-container li{list-style:none;display:none;font-size:12px;}
li a{color:#F00;text-decoration:none;margin-left:10px;}
li a:hover{text-decoration:underline;}
一生这么一次不再因为任性而不肯低头 不再因为固执而轻言分手 坚信一次 一颗心需要坚定地去温暖另一颗心 一直走 就可以到白头 就那样相守 在来往的流年里 岁月安好 惟愿这一生 执子之手 与子偕老
如果觉得《字幕滚动效果html 修改好的jquery滚动字幕效果实现代码》对你有帮助,请点赞、收藏,并留下你的观点哦!