前言css
css3 loading動畫css3
animation介紹瀏覽器
定義和用法函數
animation屬性是一個簡寫屬性,用於設置六個動畫屬性。動畫
animation: name duration timing-function delay interation-count direction;spa
值 | 描述 |
animation-name | 規定須要綁定到選擇器的keyframe名稱 |
animation-duration | 規定完成動畫所花費的時間,以秒或毫秒爲計 |
animation-timing-function | 規定動畫的速度曲線 |
animation-delay | 規定動畫開始以前的延遲 |
animation-interation-count | 規定動畫播放次數 |
animation-direction | 規定動畫是否應該輪流反向播放 |
animation-timing-function有9個值,ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps([, [ start | end ] ]?) | cubic-bezier(x1, y1, x2, y2).net
animation-direction,規定動畫是否反方向運動,值:normal | reserve | alterative-reserve | alterativeorm
animation-play-state,新增屬性,定義動畫是否運行或暫停,屬性值爲running和pausedblog
animation-fill-mode,定義動畫播放完後的狀態,值爲none | forwards | backwards | bothget
forward指停在動畫播放完的那個狀態,backwards指回到動畫開始的狀態,
瀏覽器支持
參考連接: