jQuery结合elevateZoom演示多种放大镜效果

jQuery结合elevateZoom演示多种放大镜效果

添加时间:2021-03-17 19:02:59
站长推荐丨赞助论坛,可获取海量资源终身免费下载权限奥!
举报 举报
收藏
预览
附件 附件
  • 模板类型模板类型:放大镜
  • 模板颜色模板颜色:中级
  • 下载积分下载积分:28 米粒
  • 下载权限下载权限:

    赞助会员

elevateZoom 是一个定制性非常高的 jQuery 放大镜插件,可实现电子商务网站中查看大图的效果。它能够对一张图片或两张图片(一张缩略图和一张大图)实现放大效果。放大图片的位置可自定义设置,并且支持内缩放,使用放大镜镜头展示大图。它还内置了一个相册展示的模式,可同时展示多张可缩放的图片。它自带了淡入淡出、easing 等多种效果。
jQuery结合elevateZoom演示多种放大镜效果
分类:图片代码 > 放大镜 难易:中级

HTML

首先我们看下6种不同放大镜HTML结果:

<h1>默认效果</h1>
<img id="zoom_01" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg" />
<h1>内置镜头</h1>
<img id="zoom_02" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg" />
<h1>镜头聚焦</h1>
<img id="zoom_03" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg" />
<h1>淡入/淡出设置</h1>
<img id="zoom_04" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg" />
<h1>动画</h1>
<img id="zoom_05" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg" />
<h1>鼠标滚动</h1>
<img id="zoom_06" src='images/small/image1.png' data-zoom-image="images/large/image1.jpg" />

jQuery

6中不同的放大镜效果代码都很简单,代码都已翻译注释:

$('#zoom_01').elevateZoom({});//默认效果

$('#zoom_02').elevateZoom({ //内置镜头
    zoomType: "inner",//类型:内置镜头
    cursor: "crosshair", //光标:十字
    zoomWindowFadeIn: 500,//镜头窗口淡入速度
    zoomWindowFadeOut: 750 //镜头窗口淡出速度
});

$("#zoom_03").elevateZoom({ //镜头聚焦
    zoomType: "lens",//类型:透镜效果
    lensShape: "round", //透镜形状:圆形
    lensSize: 200 //透镜尺寸:长和宽:200px
});

$("#zoom_04").elevateZoom({ //淡入/淡出设置
    zoomWindowFadeIn: 500,//镜头窗口淡入速度
    zoomWindowFadeOut: 500,//镜头窗口淡出速度
    lensFadeIn: 500,//透镜淡入速度
    lensFadeOut: 500//透镜淡出速度
});

$("#zoom_05").elevateZoom({ //动画
    easing: true //是否开启动画效果
});

$("#zoom_06").elevateZoom({ //鼠标滚动
    scrollZoom: true //是否开启鼠标滚动
});
参数 描述 默认值
responsive Set to true to activate responsivenes. If you have a theme which changes size, or tablets which change orientation this is needed to be on. Possible Values: false
scrollZoom Set to true to activate zoom on mouse scroll. Possible Values: false
imageCrossfade Set to true to activate simultaneous crossfade of images on gallery change. Possible Values: false
loadingIcon Set to the url of the spinner icon to activat false
easing Set to true to activate easing. false
easingType default easing type is easeOutExpo, (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b Extend jquery with other easing types before initiating the plugin and pass the easing type as a string value. zoomdefault

easingDuration

lensSize used when zoomType set to lens, when zoom type is set to window, then the lens size is auto calculated 200
zoomWindowWidth Width of the zoomWindow (Note: zoomType must be 400
zoomWindowHeight Height of the zoomWindow (Note: zoomType must be 400
zoomWindowOffetx x-axis offset of the zoom window 0
zoomWindowOffety y-axis offset of the zoom window 0
zoomWindowPosition Once positioned, use zoomWindowOffsetx and zoomWindowOffsety to adjust Possible values: 1-16 1
zoomTintFadeIn Set as a number e.g 200 for speed of Tint fadeIn false
zoomTintFadeOut Set as a number e.g 200 for speed of Tint fadeOut false
borderSize Border Size of the ZoomBox - Must be set here as border taken into account for plugin calculations 4
gallery This assigns a set of gallery links to the zoom image null
tint enable a tint overlay, other options: true false
tintColour colour of the tint, can be #hex, word (red, blue), or rgb(x, x, x) #333
tintOpacity 0.4 opacity of the tint
zoomLens set to false to hide the Lens true
相关内容推荐
资源求助发帖
查看更多发帖

*

回帖描述:

*

链接类型:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
热点内容推荐
标题:jQuery结合elevateZoom演示多种放大镜效果

*

描述:
平均回复时间:3-10分钟
规则介绍:悬赏寻求论坛网友分享资源,站点对分享内容的准确性,合法性,版权等没有足够的监管能力。如果您发现资源不正确,无法使用,不符合法律法律等情况,您可以直接举报资源。站长将尽快核实您的举报,并根据情况,采取封号,退换米粒等处理。

*

回帖描述:

*

链接类型:

*

阅读权限:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
  • 背景波浪
  • 背景波浪
  • 波浪
  • 波浪
客服
在线咨询
周一 至 周日 9:00 ~ 22:00
QQ:1326974360
微信:juyoubuluo6688
客服热线
18205485173
工作日 9:00 ~ 18:00
微信扫码咨询
客户服务
欢迎咨询服务
咨询量较多时,请耐心等待
社群

关注公众号

获取更多资讯

扫码进群(QQ)

与更多大牛交流沟通

0.213891s