嗨,我怎样才能使图像列表以特定延迟出现在随机位置的其他图像之上?像这样的东西,但带有随机图像列表....
http://jsfiddle.net/postcolonialboy/HfLZ4/45/
function placeimage(){
$div = $('#bgimagerandom');
$div.css('position','absolute');
id = 'ranimg'+Math.floor(Math.random()*55);
left = Math.floor(Math.random()*parseInt($div.innerWidth()));
top = Math.floor(Math.random()*parseInt($div.innerHeight()));
$div.append('<img src="http://www.gravatar.com/avatar/e1122386990776c6c39a08e9f5fe5648?s=128&d=identicon&r=PG" alt="image" id="'+id+'" onclick="doclick(this.id);" style="display: none; position: relative;">');
$img = $('#'+id);
$img.css('top',left+'px');
$img.css('left',top+'px');
$img.show();
setInterval(function(){placeimage();}, 10000);
}
placeimage();