您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關(guān)css+html怎么實現(xiàn)Skeleton Screen加載占位圖動畫效果,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
效果
自上而下漸隱漸現(xiàn)
源碼
html,用的angular語法,只要做簡單的修改就可以成為你需要的語法
<div *ngFor="let item of [1,1,1],index as index" class="skeletonItem anim-opacity2 animation-delay{{index}}"> <div class="skeletonText "></div> <div class="skeletonText" style="width:70%"></div> <div class="skeletonText" style="width:40%"></div> </div>
css
.skeletonItem { padding: 16px; border-bottom: 3px solid #eee; } .skeletonText { height: 16px; background: #e2e2e2; margin-top: 12px; border-radius: 4px; } .skeletonText:first-child { margin-top: 0; } .anim-opacity2 { animation: 1.5s opacity2 0s infinite; } .animation-delay0 { animation-delay: 0s; } .animation-delay1 { animation-delay: 0.5s; } .animation-delay2 { animation-delay: 1s; } @keyframes opacity2 { 0% { opacity: 0.5 } 50% { opacity: 1; } 100% { opacity: 0.5; } }
關(guān)于“css+html怎么實現(xiàn)Skeleton Screen加載占位圖動畫效果”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。