今天就跟大家聊聊有關CSS中怎么實現橫向粒子變動加載動畫,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結了以下內容,希望大家根據這篇文章可以有所收獲。
● animation-fill-mode屬性規定動畫在播放之前或之后,其動畫效果是否可見。
none:不改變默認行為。
forwards:當動畫完成后,保持最后一個屬性值(在最后一個關鍵幀中定義)。
backwards:在animation-delay所指定的一段時間內,在動畫顯示之前,應用開始屬性值(在第一個關鍵幀
中定義)。
both: 向前和向后填充模式都被應用。
● animation-delay屬性定義動畫何時開始。該屬性允許負值,示例中延遲0.16s執行動畫。
#loader7:before, #loader7:after, #loader7 { border-radius: 50%; width: 2.5em; height: 2.5em; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation: load7 1.8s infinite ease-in-out; animation: load7 1.8s infinite ease-in-out; } #loader7 { margin: 60px 50px; float: left; font-size: 10px; position: relative; text-indent: -9999em; -webkit-animation-delay: 0.16s; animation-delay: 0.16s; } #loader7:before { left: -3.5em; } #loader7:after { left: 3.5em; -webkit-animation-delay: 0.32s; animation-delay: 0.32s; } #loader7:before, #loader7:after { content: ''; position: absolute; top: 0; } @-webkit-keyframes load7 { 0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em #000000; } 40% { box-shadow: 0 2.5em 0 0 #000000; } } @keyframes load7 { 0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em #000000; } 40% { box-shadow: 0 2.5em 0 0 #000000; } }
看完上述內容,你們對CSS中怎么實現橫向粒子變動加載動畫有進一步的了解嗎?如果還想了解更多知識或者相關內容,請關注億速云行業資訊頻道,感謝大家的支持。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。