我有一个相同大小的div图像。 当我点击图像时,它会放大300倍之前的尺寸。 我想要做的是,我不想在我的图像容器div上留下任何空白区域。 它对左列中的图像工作正常,但是当我点击左列以外的图像时,它会留下空白区域。
这是缩放前的原始视图。
我正在使用的代码是 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;
}