技術(shù)頻道導(dǎo)航
HTML/CSS
.NET技術(shù)
IIS技術(shù)
PHP技術(shù)
Js/JQuery
Photoshop
Fireworks
服務(wù)器技術(shù)
操作系統(tǒng)
網(wǎng)站運(yùn)營(yíng)

贊助商

分類目錄

贊助商

最新文章

搜索

一圖解釋 animation-direction 屬性 normal | reverse | alternate | alternate-reverse

作者:admin    時(shí)間:2022-3-17 13:45:37    瀏覽:

CSS3 animation 動(dòng)畫屬性 animation-direction 是一個(gè)動(dòng)畫方向的屬性,該屬性有4個(gè)值:normal | reverse | alternate | alternate-reverse,它們的運(yùn)動(dòng)方向是不同的,本文著重介紹它們的區(qū)別。

下圖一目了然顯示了 animation-direction 屬性 normal | reverse | alternate | alternate-reverse 它們的運(yùn)動(dòng)方向不同之處。

一圖解釋 animation-direction 屬性

animation-direction: normal;

動(dòng)畫向前播放。當(dāng)它到達(dá)結(jié)尾時(shí),它會(huì)從第一個(gè)關(guān)鍵幀重新開始。

animation-direction: reverse;

動(dòng)畫向后播放:從最后一個(gè)關(guān)鍵幀開始,在第一個(gè)關(guān)鍵幀結(jié)束。

animation-direction: alternate;

動(dòng)畫先向前播放,然后向后播放:

  • 從第一個(gè)關(guān)鍵幀開始
  • 停在最后一個(gè)關(guān)鍵幀
  • 重新開始,但在最后一個(gè)關(guān)鍵幀
  • 停在第一個(gè)關(guān)鍵幀

animation-direction: alternate-reverse;

動(dòng)畫首先向后播放,然后向前播放:

  • 從最后一個(gè)關(guān)鍵幀開始
  • 停在第一個(gè)關(guān)鍵幀
  • 重新開始,但在第一個(gè)關(guān)鍵幀
  • 停在最后一個(gè)關(guān)鍵幀

您可能對(duì)以下文章也感興趣

標(biāo)簽: animation-direction  animation  
x