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

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

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

淘建站为您提供更多_图片代码_放大镜_放大镜_elevateZoom,在此特别感谢您对我们的支持与厚爱!

查看演示

演示不了,点击反馈

加入收藏

下载 163 次

下载资源

15 淘币

特别说明:本站资源来自网友发布分享,仅供学习与参考,请勿用于商业用途,若有侵权请联系删除(272966172@qq.com)。
分类:图片代码 > 放大镜 难易程度:中级

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

声明:本资料由淘建站会员提供,如转载注明来源,资料来源淘建站免费素材库:https://www.taojz.cn/texiao/127.html
jQuery结合elevateZoom演示多种放大镜效果 希望对你有帮助,感谢您的支持!
  • 图片放大镜效果2

    图片放大镜效果2

  • 图片放大镜效果

    图片放大镜效果

  • jQuery模仿苹果手机放大图片和文字

    jQuery模仿苹果手机放大图片和文字

  • 放大镜组件

    放大镜组件

  • 纯js放大镜和JQuery放大镜

    纯js放大镜和JQuery放大镜

  • JavaScript img+div放大镜

    JavaScript img+div放大镜

  • 仿淘宝图片放大镜

    仿淘宝图片放大镜

  • 商品图片放大镜效果

    商品图片放大镜效果

  • 淘宝宝贝展示效果放大镜效果

    淘宝宝贝展示效果放大镜效果

  • 鼠标悬停图片放大镜效果自制效果源码下载

    鼠标悬停图片放大镜效果自制效果源码下载

  • 仿京东商城商品放大镜

    仿京东商城商品放大镜

  • 自己写的放大镜

    自己写的放大镜

  • 留言(0)
    头像
     阿里云限量代金券,戳我领取
    1 2