jQuery插件Step Carousel Viewer实现Javascript图片滑动旋转效果

Google AD

需要将产品图片或相片等实现Javascript图片滑动旋转Animation效果,能自动播放图片或鼠标控制播放图片,图片固定的滑动在指定的区域内,类似动画播放,使用jQuery插件Step Carousel Viewer可实现该功能,而且使用简单,Step Carousel Viewer中文大概是按步旋转阅读,意思是说每张图片一张一张旋转阅读,效果:

jQuery插件Step Carousel Viewer实现Javascript图片滑动旋转效果

<script type="text/javascript">
// For instructions how how to modify go to this URL
// http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm
stepcarousel.setup({
	galleryid: 'mygallery', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:2000},
	panelbehavior: {speed:500, wraparound:true, persist:true},
	defaultbuttons: {enable: false, moveby: 1, leftnav: ['../317e0s5.gif', -5, 80], rightnav: ['../33o7di8.gif', -20, 80]},
	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file']
})
</script>

1,galleryid 图片滑动旋转外层的DIV,如:mygallery
2,beltclass 图片滑动旋转中间层的Class,如:belt
3,panelclass 图片滑动旋转图片显示层的Class,如:panel
4,autostep 自动播放设置
5,panelbehavior 图片滑动效果
6,defaultbuttons 默认按钮,左导航按钮,如:biuuu_left.gif,右导航按钮,如:biuuu_right.gif
7,statusvars 注册三个变量,包含当前显示start图片数,当前last图片数和总图片数
8,contenttype 内容设置,可选inline或external

 
<div id="slider_nav">
<div style="float:left;"> <a href="javascript:stepcarousel.stepBy('mygallery',%20-1)"><img src="index_files/arr-left.png" alt="Back"></a> </div>
<div style="float:right;"> <a href="javascript:stepcarousel.stepBy('mygallery',%201)"><img src="index_files/arr-right.png" alt="Forward"></a> </div>
</div>

1,当前图片数<span id=”statusA”></span> 总图片数<span id=”statusC”></span>
2,往最后图片stepcarousel.stepBy(‘mygallery’, -1)
3,往开始图片stepcarousel.stepTo(‘mygallery’, 1)
4,向前一张图片stepcarousel.stepBy(‘mygallery’, 1)
5,向前二张图片stepcarousel.stepBy(‘mygallery’, 2)

实现由文字链接控制当前图片滑动,方法stepcarousel.stepBy()和stepcarousel.stepTo()上面mygallery表示图片滑动旋转外层DIV的ID,直接调用即可实现。

提示:你可以先修改部分代码再运行。

arr-left
arr-right

相关文章

  1. JQUERY 隐藏页面无连接图片
  2. JQuery 新闻头条淡入淡出效果
  3. JavaScript可移动弹出层
  4. javascript+css 新闻滑轮显示
  5. JQUERY 层-隐藏-显示 效果

关于站长

姚迎迎,生于 1985年3月2日, 江苏大丰人士 。修行于福州大学软件学院

Taobao AD

Google 广告