使用jquery实现的漂亮的滚动图片
2011-11-17 13:33
513 查看
应客户的要求实现一个滚动图片的效果,使用javascript+css从0开始还是有一定难度的。但是我们有万能的互联网,从网上找了一下,很多这样的列子,于是找了一个稍加修改就达到了客户的要求。
首先看一下效果图:
下载地址
下面贴一下主要的代码:
具体可以查看jquery中jCarouselLite的用法
项目已经上传到csdn上,请多指教。下载地址:http://download.csdn.net/detail/zhengzhb/3804417
首先看一下效果图:
下载地址
下面贴一下主要的代码:
<html> <head> <title>水平滚动</title> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="style.css" media="screen"> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="lib.min.js"></script> </head> <body> <br/> <div id="jCarouselLiteDemo"> <img src="tplj.gif" width="24" height="114"/><img src="jt.gif" width="17" height="114" class="prev" style="cursor:hand"/> <div class="carousel default" style="position:absolute; left:41px;"> <div class="jCarouselLite"> <ul> <li><img alt="haha" src="img1.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img2.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img3.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img4.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img5.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img2.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img3.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> <li><img alt="haha" src="img4.jpg" style="cursor:hand" onclick="javascript:openwindow('#')"></li> </ul> </div> <div style="position:relative; top:-1px; left:-3px;"><img src="jt_right.gif" width="21" height="114" class="next" style="cursor:hand"/></div> </div> <script type="text/javascript"> $(".default .jCarouselLite").jCarouselLite({ btnNext: ".default .next", //下一张图片 btnPrev: ".prev",//上一张兔皮啊没 auto: 2000,//指定2000毫秒定期自动滚动 circular: true,//是否循环滚动 mouseWheel: true,//鼠标滑是否可以轮控制上下滚动 scroll: 1,//每次滚动的图片数量 speed: 600,//滚动速度 start: 0,//开始的地方 vertical: false,//是否垂直滚动 visible: 4//可见数量 }); function openwindow(url){ window.open(url); } </script> </div> </body> </html>
具体可以查看jquery中jCarouselLite的用法
项目已经上传到csdn上,请多指教。下载地址:http://download.csdn.net/detail/zhengzhb/3804417
相关文章推荐
- 使用jQuery简单实现产品展示的图片左右滚动功能
- 使用jQuery简单实现产品展示的图片左右滚动功能
- 使用JQuery.slideBox实现图片滚动效果
- 使用jQuery简单实现产品展示的图片左右滚动功能
- 使用jQuery简单实现产品展示的图片左右滚动功能
- 使用jQuery简单实现产品展示的图片左右滚动功能
- 在asp.net中使用JQuery的SlideViewer插件实现图片的滚动效果
- jQuery+CSS实现的图片滚动效果
- 简短几句jquery代码的实现一个图片向上滚动切换
- jQuery使用数组编写图片无缝向左滚动
- Jquery实现图片左右滚动,没有头尾的,一直循环
- Jquery+css实现图片无缝滚动轮播
- jquery实现marquee效果(文字或者图片的水平垂直滚动)
- 使用jquery-panzoom来实现图片或元素的放大缩小
- 使用jquery实现页面滚动到底部自动加载新的信息
- jquery实现图片左右间隔滚动特效(可自动播放)
- jquery.imageScroller实现图片滚动
- 使用jquery的lazy loader插件实现图片的延迟加载
- JQuery页面图片切换和新闻列表滚动效果的具体实现
- 使用jQuery实现图片轮播的方法