【发布时间】:2012-11-14 22:06:40
【问题描述】:
对不起这个菜鸟问题,我正在努力让三个红色的气泡一个一个出现,请看我的代码:http://jsfiddle.net/FLt9Z/
javascript 的那部分看起来像这样:
function leftappear() {
$('#redbubble-left').show();
}
function topappear() {
$('#redbubble-top').show();
}
function rightappear() {
$('#redbubble-right').show();
}
var animation_script = [
{
at_time: 30 * 1000, // 30 seconds
animation: leftappear()
},
{
at_time: 31 * 1000, // 31 seconds
animation: topappear()
},
{
at_time: 32 * 1000, // 32 seconds
animation: rightappear()
}
];
var current_time = 0;
function animate_next() {
var next = animation_script.shift(),
time_between = next.at_time - current_time;
setTimeout(function () {
current_time = next.at_time;
next.animation();
animate_next();
}, time_between);
}
非常感谢大家!
【问题讨论】:
-
漂亮的图形,但您的消息缺少一个问题。不要让我们猜测这个问题,否则它可能会被关闭。
标签: jquery html css jquery-animate settimeout