對不起,這個菜鳥的問題,我想提出三個紅色的語音泡沫一一呈現,請看到我的代碼在這裏:http://jsfiddle.net/FLt9Z/jQuery的setTimeout和顯示
了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);
}
非常感謝你們!
不錯的圖形,但是你的信息缺少一個問題。不要讓我們猜測這個問題,否則它可能會被關閉。 – ZippyV