在放大另一个图像时,自动在div内部排列图像而不留任何空白区域

时间:2015-02-25 04:46:45

标签: jquery html

我有一个相同大小的div图像。 当我点击图像时,它会放大300倍之前的尺寸。 我想要做的是,我不想在我的图像容器div上留下任何空白区域。 它对左列中的图像工作正常,但是当我点击左列以外的图像时,它会留下空白区域。

这是缩放前的原始视图。

This is how images appear in the start

When i scaled the first image it worked perfectly fine

But when i scale any image which is not in the left column it appears like this i don't want the white space

我正在使用的代码是     Jquery的

$(".light-box-items").click(function(){
            $("#"+zoomedImage).animate({"height":"200px" , "width":"25%"},400);
            $(this).animate({"height":"600px" , "width":"75%"},400);
            zoomedImage = this.id;
    });

CSS

#light-box{
position:absolute;
right:-93%;
min-height:100%;
height:auto;
width:80%;
background-color:grey;}
.light-box-items
{
    height:200px;
    width:25%;
    background-color:red;
    float:left;
}

0 个答案:

没有答案