jQuery+iPresenter3D旋转图片超炫效果

来源:https://www.sucaihuo.com/js/86.html 2015-05-01 09:23浏览(2257) 收藏

IPresenter是一款简单而强大的轮播图片插件,可以很简单的设计3D效果,并且支持移动端。本文以两个DEMO来讲述IPresenter。
jQuery+iPresenter3D旋转图片超炫效果
分类:图片代码 > 图片轮播 难易:高级
查看演示 下载资源 下载积分: 20 积分
关注公众号,免费赠送安装视频教程、环境和学习视频,后面会不断更新。

HTML

首先我们在#ipresenter放置多个div

<div id="ipresenter"> 
    <div id="intro" class="step" data-x="0" data-y="0" data-thumbnail="img/thumbnails/1.jpg"> 
     <img src="img/details.png" /> 
     <h2> A phone that sees the world like you do, in 3D</h2> 
     <p> Now your photos can have as much depth as the moment itself. HTC EVO 3D captures your photos and videos in 3D, plus you can view them without the glasses. The stunning 4.3-inch qHD display gives you crisp websites, vivid images and incredibly fluid videos. </p> 
    </div>
    ......
</div>

jQuery

调用轮播插件ipresenter Api非常丰富:

$('#ipresenter').iPresenter({
    timerPadding: -1,
    //计时器内边距 
    controlNav: true,
    //是否显示控制按钮
    controlNavThumbs: true,
    //是否显示缩略图控制
    controlNavNextPrev: false //是否显示“上一张”“下一张”导航 
});

DEMO2 API说明:

$('#ipresenter').iPresenter({
    animSpeed: 2000,
    //切换时间 毫秒
    timer: '360Bar',
    //计时器样式 “Pie”, “360Bar” 或 “Bar”
    timerDiameter: 60,
    //计时器直径
    timerStroke: 5,
    // 	计时器边框宽度 
    timerPadding: 5,
    //计时器内边距 
    timerColor: '#000',
    // 	计时器文字颜色 
    timerBg: '#FFF',
    //计时器背景色
    timerOpacity: 0.4,
    //计时器的不透明度 
    directionNav: false,
    // 	是否显示“上一张”“下一张”导航 
    controlNav: true //是否显示控制按钮
});

iPresenter API

参数 描述 默认值
captionSpeed 标题切换速度 整数
captionEasing 标题切换效果 null
captionOpacity 标题透明度 0-1的小数
animationSpeed 幻灯片切换速度 -
pauseTime 每张幻灯片显示时间 -
startSlide 从第几张开始播放 -
directionNav 是否显示“上一张”“下一张”导航 -
directionNavHoverOpacity 鼠标移动到导航条上时的不透明度 -
controlNav 是否显示数字导航 -
controlNavNextPrev 是否显示“上一张”“下一张”导航 -
controlNavHoverOpacity 鼠标移动到导航条上时的不透明度 -
controlNavThumbs 是否显示拇指导航 -
controlNavTooltip 是否显示预览图提示 -
autoAdvance 是否自动切换 -
keyboardNav 是否允许键盘按键导航 -
touchNav 是否允许触摸滑动来切换 -
pauseOnHover 是否当鼠标移动到幻灯片上时暂停切换 -
nextLabel “下一张”按钮上的文字 -
previousLabel “上一张”按钮上的文字 -
playLabel “播放”按钮上的文字 -
pauseLabel “暂停”按钮上的文字 -
closeLabel “关闭”按钮上的文字 -
onBeforeChange 在一张图片切换之前调用的函数 function(){}
onAfterChange 在一张图片切换之后调用的函数 function(){}
onSlideshowEnd 当所有图片显示后调用的函数 function(){}
onLastSlide 当最后一张图片显示后调用的函数 function(){}
onAfterLoad 当幻灯片加载后调用的函数 function(){}
onPause 当幻灯片暂停时调用的函数 function(){}
onPlay 当幻灯片播放时调用的函数 function(){}
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2