最新赞助活动温馨提示:自愿赞助服务器费用,学生和没有工作的整站资源免费下载!
头像

EasyZoom.js图片平移缩小放大插件

来源:http://www.erdangjiade.com/ 沐浴春风 2016-01-19 20:54浏览(1631)

EasyZoom.js支持局部放大图片,也可以生成另一张放大的预览图,而且支持鼠标平移,在移动端也可以浏览。

0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值

EasyZoom.js图片平移缩小放大插件
分类:图片代码 > 放大镜 难易:中级
查看演示

加我微信,拉你进VIP群学习:

下载资源 下载积分: 30 积分
<div class="easyzoom">
    <a href="images/zoom.jpg">
        <img src="images/standard.jpg" alt="" />
    </a>
</div>
.easyzoom {
    float: left;
}
.easyzoom img {
    display: block;
}


/* Shrink wrap strategy 2 */
.easyzoom {
    display: inline-block;
}
.easyzoom img {
    vertical-align: bottom;
}
var $easyzoom = $('.easyzoom').easyZoom();
var api = $easyzoom.data('easyZoom');

EasyZoom.js相关API教程

参数 描述 默认值
EasyZoom.js 加载提示 Loading image
errorNotice 错误提示 The image could not be loaded
errorDuration 错误延迟动画时间 毫秒 2500
preventClicks 禁止放大图片点击 true

EasyZoom.js方法Method

onShow 当弹出层显示回调 -
onHide 当弹出层消失回调 -
.show([MouseEvent|TouchEvent], [Boolean]) Displays the zoom image flyout. Optionally takes an instance of a mouse or touch event and can be set to only display the flyout if the mouse is over the target. -
.teardown() Removes all events and elements created and attached by EasyZoom. -
.swap(standardSrc, zoomSrc, [srcsetStringOrArray]) Easily switch the standard and zoom image sources. To display retina images via the srcset attribute, use the optional srcsetStringOrArray argument. -
声明:本文为原创文章,如需转载,请注明来源erdangjiade.com并保留原文链接:https://www.erdangjiade.com/js/688.html
评论0
头像

友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群

1 2