CSS animation-direction 屬性
更多“自己嘗試”的例子見下文。
定義和用法
animation-direction 屬性定義動畫是按正向、反向還是交替迴圈播放。
| 預設值 | normal |
|---|---|
| 繼承 | no |
| 可動畫 | 否。 閱讀關於可動畫屬性 |
| 版本 | CSS3 |
| JavaScript 語法 | object.style.animationDirection="reverse" 嘗試一下 |
瀏覽器支援
表中的數字指定了完全支援該屬性的第一個瀏覽器版本。
| 屬性 | |||||
|---|---|---|---|---|---|
| animation-direction | 43 | 10 | 16 | 9 | 30 |
CSS 語法
animation-direction: normal|reverse|alternate|alternate-reverse|initial|inherit;
屬性值
| 值 | 描述 | 演示 |
|---|---|---|
| normal | 預設值。動畫按正常(正向)方向播放 | 試一試 » |
| reverse | 動畫反向播放(向後) | 試一試 » |
| alternate | 動畫先正向播放,然後反向播放 | 試一試 » |
| alternate-reverse | 動畫先反向播放,然後正向播放 | 試一試 » |
| initial | 將此屬性設定為其預設值。閱讀關於initial | |
| inherit | 從其父元素繼承此屬性。閱讀關於inherit |
更多示例
相關頁面
CSS 教程:CSS 動畫
HTML DOM 參考:animationDirection 屬性