javascript 用于缩放 div 的 Jquery 缩放插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18112943/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jquery zoom plugin to zoom a div
提问by Sgotenks
i've been searching a little bit on internet for a jquery plugin letting me to zoom an image.
我一直在互联网上搜索一些 jquery 插件,让我可以缩放图像。
I found many of them, doing it in several ways, my favorites are those ones that zoom the image in a separate area and not directly the original image.
我找到了很多方法,有几种方法,我最喜欢的是那些在单独的区域中缩放图像而不是直接缩放原始图像的方法。
ex http://i-like-robots.github.io/EasyZoom/(one of the many)
前http://i-like-robots.github.io/EasyZoom/(众多之一)
But all these plugins seems to work directly on img tag instead i would like to zoom a div with src attribute referring to an image. (The html main structure is given so i cannot change it that much).
但是所有这些插件似乎都直接在 img 标签上工作,而不是我想用引用图像的 src 属性来缩放一个 div。(给出了 html 主要结构,所以我不能对其进行太多更改)。
Do you know any plugin doing it or do you know how i could do it? (would be better if t works also ojn IE8-9, even if it's not a must) Thanks
你知道有什么插件可以做到这一点,或者你知道我怎么做吗?(如果 t 也适用于 IE8-9 会更好,即使它不是必须的)谢谢
回答by Somnath Kharat
Use Zoomooz pluginsthere are free and simple to use
使用Zoomooz 插件,免费且易于使用
See Simple Zoom Demo with Zoomooz on jsfiddle
在 jsfiddle 上查看使用 Zoomooz 的简单缩放演示
$("#zoom").click(function () {
$(this).zoomTo({
targetsize: 1.0,
root: $(".container")
});
});
回答by Steve
I think zoomooz will do what you're looking for. http://jaukia.github.io/zoomooz/
我认为 zoomooz 会做你想要的。 http://jaukia.github.io/zoomooz/
回答by akelya
here is a few list of jQuery plugins try it.
这里有一些 jQuery 插件列表,可以尝试一下。
http://kvcodes.com/2014/02/jquery-plugins-for-containerdiv-zoom/
http://kvcodes.com/2014/02/jquery-plugins-for-containerdiv-zoom/

