图片放大缩小,移动端图片根据手势缩放"/>
html5手指滑动图片放大缩小,移动端图片根据手势缩放
插件描述:PinchZoom.js是一个Javript库,提供多点触摸手势缩放和拖动任何DOM元素。
注意请在移动端查看效果
使用
要求jQuery or Zepto.
ECMA 5 support
初始化new PinchZoom($('#your-element'), options);
选项tapZoomFactor: The zoom factor a double tap zooms to. (default 2)
zoomOutFactor: Resizes to original size when zoom factor is below the configured value. (default 1.3)
animationDuration: The animation duration in milliseconds. (default 300)
maxZoom: The maximum zoom factor. (default 4)
minZoom: The minimum zoom factor. (default 0.5)
lockDragAxis Locks panning of the element to a single axis. (default false)
事件Pinchzoom 发出一些自定义的事件
pz_zoomstart Started to zoom
pz_zoomend Stopped zooming
pz_dragstart Started to drag the element
pz_dragend Stopped to drag the element
pz_doubletap Resetting the zoom with doubletab
方法enable: Enables all gesture capturing (default)
disable: Disables all gesture capturing
更多推荐
html5手指滑动图片放大缩小,移动端图片根据手势缩放
发布评论