animation 简写 CSS property applies an animation between styles. It is a shorthand for animation-name , animation-duration , animation-timing-function , animation-delay , animation-iteration-count , animation-direction , animation-fill-mode ,和 animation-play-state .

The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

/* @keyframes duration | timing-function | delay |
iteration-count | direction | fill-mode | play-state | name */
animation: 3s ease-in 1s 2 reverse both paused slidein;
/* @keyframes name | duration | timing-function | delay */
animation: slidein 3s linear 1s;
/* @keyframes name | duration */
animation: slidein 3s;
					
  1. CSS
  2. CSS 参考
  3. CSS 动画
  4. 指南
    1. CSS 动画提示和技巧
    2. 检测 CSS 动画支持
    3. 使用 CSS 动画
  5. At-Rules
    1. @keyframes
  6. 特性
    1. <custom-ident>
    2. animation
    3. animation-delay
    4. animation-direction
    5. animation-duration
    6. animation-fill-mode
    7. animation-iteration-count
    8. animation-name
    9. animation-play-state
    10. animation-timing-function

Copyright  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1