6.3 動畫效果的佇列(Queues)

介紹 .delay(seconds)

延遲一段時間,例如 2 秒,然後搭配 animate 函式:

$("div.div_block").animate({
  "width": "150px",
  "height": "150px"
}, 2000).delay(2000).animate({
  "border-radius": "50%"
}, 2000).delay(2000).animate({
  "width": "100px",
  "height": "100px",
  "border-radius": "0%"
}, 2000);

範例:6_3_animate_delay.html

Last updated