尝试删除加载动画时,单个图像已完成加载,但已遇到问题。加载第一张图片后加载动画会被删除,而不是在加载特定图片时单独加载。多个加载调整器的图像列表
我想有一个图像的行,每个都有自己的加载giff,任何想法?
这是我想出了到目前为止....
.img-container{
float:left;
width:500px;
height:500px;}
.img-loading{
position:absolute;
background:url('loading.gif') center center no-repeat;
width:500px;
height:500px;}
<div class="img-container"><div class="img-loading"></div><img src="example.jpg" height="500" width="500" border="0"/></div>
<div class="img-container"><div class="img-loading"></div><img src="example2.jpg" height="500" width="500" border="0"/></div>
<div class="img-container"><div class="img-loading"></div><img src="example.jpg3" height="500" width="500" border="0"/></div>
$(document).ready(function(){
$('img').css({'display':'none'});
$('img').bind('load', function() { $(this).fadeIn(1500);$('.img-loading').fadeOut(2000);});
});