jQuery 图片轮播,滚动效果
来源:互联网 发布:dnf黄字伤害算法 编辑:程序博客网 时间:2024/06/12 04:19
jQuery图片轮播滚动效果
<div class="div2"> <div class="div-ul-2"> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> </ul> </div> <div class="div-btn-2"> <a href="javascript:void(0);" class="btn-pre">上一个</a> <a href="javascript:void(0);" class="btn-nex">下一个</a> </div> </div>
.div2{margin: 0 auto; width: 1300px;}.div-ul-2{font-size: 0; width: 650px; overflow: hidden; white-space: nowrap;}.div-ul-2 ul li{width: 98px; height: 148px; border: 1px green solid; display: inline-block; background: #eee; margin: 0 15px; font-size: 18px; text-align: center; line-height: 150px;}.div-btn-2 a{display: inline-block; width: 50px; height: 20px; line-height: 20px; border: 1px #000 solid; text-align: center}
$(function(){function leftm(){$(".div-ul-2 ul").animate({marginLeft:"-130px"},1000,function(){$(this).css("margin-left","0px").find("li:first").appendTo(this);});}function rightm(){$(".div-ul-2 ul").find("li:last").prependTo(".div-ul-2 ul");$(".div-ul-2 ul").css("margin-left","-130px").animate({marginLeft:"0px"},1000);}$(".btn-nex").click(function(){if(!$(".div-ul-2 ul").is(":animated")){leftm();}});$(".btn-pre").click(function(){if(!$(".div-ul-2 ul").is(":animated")){rightm();}});var scrolltime = setInterval(leftm,2000);$(".div2").hover(function(){scrolltime = clearInterval(scrolltime);},function(){scrolltime = setInterval(leftm,2000);});//setInterval(leftm,5000);});
0 0
- jQuery 图片轮播,滚动效果
- JQuery实现图片轮播滚动效果
- Jquery图片轮播效果
- jQuery图片轮播效果
- jquery banner广告幻灯片图片轮播切换,模仿实现当当网滚动广告效果
- Jquery图片轮播效果2
- JQuery实现图片轮播效果
- JQuery实现图片轮播效果
- 使用Jquery实现图片轮播效果
- jquery图片轮播效果代码
- jQuery实现图片轮播效果
- jquery实现图片轮播效果
- jQuery实现图片轮播效果
- jQuery实现图片轮播效果
- jquery的图片轮播效果
- 用Jquery实现轮播图片效果
- jQuery实现图片轮播效果
- 图片轮播/滚动
- 新版Matlab中神经网络训练函数Newff的使用方法
- 【POJ】2774 Long Long Message 后缀数组
- 超级炫酷的打开软件方式,特别适合打开那种不想让人知道的软件。除非他也知道这个方法否则无法打开。
- openwrt 转发
- Mac 远程访问Parallels Desktop 虚拟机里面的 Ubuntu Server OS
- jQuery 图片轮播,滚动效果
- 备忘篇——为什么用户名和密码都正确了,还是进不了共享文件
- asp.net MVC helper 和自定义函数@functions小结
- 分享12306全自动验证码识别提交,春运抢票准备时
- 算法导论-第23章-最小生成树:Prime算法(基于vector)的C++实现
- HTTP和SOAP完全就是两个不同的协议
- ubuntu使用make-kpkg安装新内核
- 理解矩阵
- 组合题目的分析