css代码:
ul#portfolio{margin:0;padding:0;}
ul#portfolio li{float: left;margin:0 5px 0 0;width:250px;height: 250px;list-style: none;}
ul#portfolio li.loading{background: url(../images/spinner.gif) no-repeat center center;}
ul#portfolio li img{width:250px;height: 250px;display: block;}
js代码:
$(function(){
var images=new Array();
images[0]='./images/ads_one.jpg';
images[1]='./images/ads_two.jpg';
images[2]='./images/ads_three.jpg';
//获取了图像的数量
var max=$(images).length;
//如果包含一张以上的图像,那么创建对应的UL元素家人到wrapper div中,并且调用LoadImage方法。
if(max>0){
//create the UL element
var ul=$('以上所述是小编给大家介绍的jQuery 实现图片的依次加载图片,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!



