2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > 图片自动轮播php代码生成器 JS实现div内部的文字或图片自动循环滚动代码

图片自动轮播php代码生成器 JS实现div内部的文字或图片自动循环滚动代码

时间:2020-05-16 16:56:13

相关推荐

图片自动轮播php代码生成器 JS实现div内部的文字或图片自动循环滚动代码

.content{width:500px;height:300px;position:absolute;left:200px;top:100px;border:solid 2px red;padding:10px;overflow:hidden}

dl{width:400px;height:30px;border:1px solid black;}

测试数据1 测试数据2 测试数据3 测试数据4 测试数据5 测试数据6 测试数据7 测试数据8 测试数据9 测试数据10

$(function(){

$('.content dl').hide();

$('.content dl:gt('+($('.content dl').length - 5)+')').show();

window.setInterval(function(){

$('.content dl:visible:first').prev().slideDown("fast",function(){

$(this).animate({opacity:1},2000,function(){

if($('.content dl:hidden').length == 0){

$('.content dl').hide();

$('.content dl:gt('+($('.content dl').length - 5)+')').show();

}

});

});

},1000);

});

代码演示地址:

/js_demo/gundong.html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。