🖍️
CSS 排版及動畫效果
  • CSS 排版及動畫效果
  • 1. 簡介
    • 1.1 講者簡介
    • 1.2 課程簡介
    • 1.3 開發工具簡介
  • 2. 棋盤式排版模式 Grid
    • 2.1 基本觀念及術語
    • 2.2 Grid 排版 - Container
    • 2.3 Grid 排版 - Items
  • 3. 多欄排版模式 Column
  • 4. 轉場效果 transition
    • 4.1 第一個 transition
    • 4.2 屬性 transition-property
    • 4.3 期間 transition-duration
    • 4.4 漸變函式 transition-timing-function
    • 4.5 延遲 transition-delay
    • 4.6 transition 縮寫
    • 4.7 練習
  • 5. 動畫效果 animation
    • 5.1 第一個 animation
    • 5.2 關於 keyframes
    • 5.3 同個元素套用多個 animation
    • 5.4 次數 animation-iteration-count
    • 5.5 方向 animation-direction
    • 5.6 延遲 animation-delay
    • 5.7 填滿模式 animation-fill-mode
    • 5.8 播放狀態 animation-play-state
    • 5.9 漸變函式 animation-timing-function
    • 5.10 animation 縮寫
    • 5.11 補充:動畫效果事件(Animation Event)
    • 5.12 練習
  • 6. 作業
  • 7. 第三方動畫效果套件
    • 7.1 Animate.css
    • 7.2 AOS
    • 7.3 CSS Loader
  • 8. 大量練習
  • 9. 其它及參考資料
Powered by GitBook
On this page
  • animation-iteration-count 說明
  • animation-iteration-count 常用的設定值
  • 範例
  1. 5. 動畫效果 animation

5.4 次數 animation-iteration-count

Previous5.3 同個元素套用多個 animationNext5.5 方向 animation-direction

Last updated 1 year ago

animation-iteration-count 說明

目前已學過 animation-name 及 animation-duration 。

然而在前面的例子當中,會發現動畫效果從 0% 跑到 100% 就執行完畢了。這就是執行一次的動畫效果。

可以透過 animation-iteration-count 來設定要執行幾次。

animation-iteration-count 常用的設定值

  • 0:表示該動畫效果並不會執行。

  • 正數整:表示該動畫效果的播放次數,例:2 即會播放兩次。(預設值是 1)

  • infinite:表示該動畫效果會執行無限多次。

範例