如何放大和缩小照片库

时间:2014-08-30 11:47:54

标签: fotorama

在网站上我创建一个抽屉打开,一个画廊出来。它从大小(0,0)开始并缩放到屏幕中间,由JS控制:

$(id).css("z-index", "4").stop().animate({
    "top" : rect.top + "px",
    "left" : rect.left + "px",
    "height" : rect.height + "px",
    "width" : rect.width + "px"
}, step_dauer * duration, easing);

这样,div可以根据需要进行缩放,但内部的照片不会:主图像和缩略图保持其大小。

因此,我没有看到照片剪切

所以,我的问题是:

如何让画廊以真实的方式出现在抽屉外?

1 个答案:

答案 0 :(得分:0)

您是否尝试过选择图库内部的ID?而不是$("#idOfGallery")您可以尝试$("#idOfGallery img")甚至$("#idOfGallery img").first()

希望这有帮助。