网页放大插件,主要针对的是容器,不单单是图片
jsZoom.js
网页放大插件,主要针对的是容器,不单单是图片
zoom.jsEnables a minimal JS API for zooming in on specific points or DOM elements.
Note that this is only a proof of concept so don't use it for anything important. Does not work in IE, yet.
Try out the demo.
Usage Zoom in on an element:zoom.to({ element: document.querySelector( 'img' ) });
Additional options:
zoom.to({
element: document.querySelector( 'img' ),
// Amount of empty space around zoomed element
padding: 20,
// Function to call once zooming completes
callback: function() { /* ... */ }
});
Zoom in on a point:
zoom.to({ x: 100, y: 200, width: 300, height: 300 });
zoom.to({ x: 100, y: 200, scale: 3 }); Reset
zoom.out();
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。