這篇文章將為大家詳細講解有關css+html怎么實現Skeleton Screen加載占位圖動畫效果,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
創新互聯堅持“要么做到,要么別承諾”的工作理念,服務領域包括:成都網站設計、網站制作、企業官網、英文網站、手機端網站、網站推廣等服務,滿足客戶于互聯網時代的石林網站設計、移動媒體設計的需求,幫助企業找到有效的互聯網解決方案。努力成為您成熟可靠的網絡建設合作伙伴!
效果
自上而下漸隱漸現
源碼
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; } }
關于“css+html怎么實現Skeleton Screen加載占位圖動畫效果”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
文章名稱:css+html怎么實現SkeletonScreen加載占位圖動畫效果
鏈接分享:http://www.yijiale78.com/article30/jcespo.html
成都網站建設公司_創新互聯,為您提供、小程序開發、網站排名、網站維護、網站導航、軟件開發
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯