純CSS實(shí)現(xiàn)預(yù)加載動(dòng)畫效果
發(fā)布時(shí)間:2017-09-06 11:46:23 作者:佚名
我要評(píng)論

本文給大家分享一段簡(jiǎn)單的代碼實(shí)現(xiàn)css預(yù)加載動(dòng)畫效果,非常不錯(cuò),具有參考借鑒價(jià)值,需要的的朋友參考下吧
效果圖
下載地址:http://xiazai.jb51.net/201709/yuanma/css_loading_jb51.rar
<style> #loading { position:absolute; left:0; top:0; width:100%; height:100%; background: #121220; overflow:hidden; z-index:9999; } /*加載圈*/ .spinner { margin:0 auto; width:60px; height:60px; position:relative; top:40%; } .container1 > div,.container2 > div,.container3 > div { width:15px; height:15px; background-color:#fff; border-radius:100%; position:absolute; -webkit-animation:bouncedelay 1.2s infinite ease-in-out; animation:bouncedelay 1.2s infinite ease-in-out; -webkit-animation-fill-mode:both; animation-fill-mode:both; } .spinner .spinner-container { position:absolute; width:100%; height:100%; } .container2 { -webkit-transform:rotateZ(45deg); transform:rotateZ(45deg); } .container3 { -webkit-transform:rotateZ(90deg); transform:rotateZ(90deg); } .circle1 { top:0; left:0; } .circle2 { top:0; right:0; } .circle3 { right:0; bottom:0; } .circle4 { left:0; bottom:0; } .container2 .circle1 { -webkit-animation-delay:-1.1s; animation-delay:-1.1s; } .container3 .circle1 { -webkit-animation-delay:-1.0s; animation-delay:-1.0s; } .container1 .circle2 { -webkit-animation-delay:-0.9s; animation-delay:-0.9s; } .container2 .circle2 { -webkit-animation-delay:-0.8s; animation-delay:-0.8s; } .container3 .circle2 { -webkit-animation-delay:-0.7s; animation-delay:-0.7s; } .container1 .circle3 { -webkit-animation-delay:-0.6s; animation-delay:-0.6s; } .container2 .circle3 { -webkit-animation-delay:-0.5s; animation-delay:-0.5s; } .container3 .circle3 { -webkit-animation-delay:-0.4s; animation-delay:-0.4s; } .container1 .circle4 { -webkit-animation-delay:-0.3s; animation-delay:-0.3s; } .container2 .circle4 { -webkit-animation-delay:-0.2s; animation-delay:-0.2s; } .container3 .circle4 { -webkit-animation-delay:-0.1s; animation-delay:-0.1s; } @-webkit-keyframes bouncedelay { 0%,80%,100% { -webkit-transform:scale(0.0) } 40% { -webkit-transform:scale(1.0) } } @keyframes bouncedelay { 0%,80%,100% { transform:scale(0.0); -webkit-transform:scale(0.0); } 40% { transform:scale(1.0); -webkit-transform:scale(1.0); } } </style> <body> <div id="loading" > <div class="spinner"> <div class="spinner-container container1"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> </div> <div class="spinner-container container2"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> </div> <div class="spinner-container container3"> <div class="circle1"></div> <div class="circle2"></div> <div class="circle3"></div> <div class="circle4"></div> </div> </div> </div> </body>
總結(jié)
以上所述是小編給大家介紹的純CSS實(shí)現(xiàn)預(yù)加載動(dòng)畫效果,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
30種CSS3炫酷頁(yè)面預(yù)加載loading動(dòng)畫特效源碼
本代碼是一組效果非常炫酷的CSS3頁(yè)面預(yù)加載loading動(dòng)畫特效源碼,當(dāng)點(diǎn)擊頁(yè)面的任何一個(gè)地方時(shí),loading動(dòng)畫就會(huì)被隱藏2017-05-24- 這是一組使用純CSS3制作的預(yù)加載動(dòng)畫特效代碼。共有3種動(dòng)畫效果,分別是翻書效果,搖晃動(dòng)畫和旋轉(zhuǎn)動(dòng)畫,需要的可以下載試試2017-03-07
CSS3 預(yù)加載Loading動(dòng)畫特效源碼
CSS3 Loading預(yù)加載動(dòng)畫特效源碼是一款使用before和after偽元素,以及CSS幀動(dòng)畫來(lái)完成各種不同的預(yù)加載指示器動(dòng)畫,感興趣的朋友可以直接下載源碼哦2016-06-30- Web前端圖片加載的方式多種多樣,其所產(chǎn)生的HTTP請(qǐng)求也各異,這里我們就來(lái)列舉CSS控制前端圖片HTTP請(qǐng)求的各種情況示例,需要的朋友可以參考下2016-06-16
純CSS圖片預(yù)加載實(shí)例 擺脫Javascript預(yù)載的束縛
有很多種方法來(lái)實(shí)現(xiàn)圖片的預(yù)加載,通常大部分使用Javascript讓事情滾動(dòng)。不要再受Javascript預(yù)載的束縛了吧,用CSS你就可以毫不麻煩的預(yù)載你的圖片,需要的朋友可以了解下2012-12-19CSS 實(shí)現(xiàn)網(wǎng)頁(yè)圖片的預(yù)加載
有很多種方法來(lái)實(shí)現(xiàn)圖片的預(yù)加載,通常大部分使用Javascript讓事情滾動(dòng)。不要再受Javascript預(yù)載的束縛了吧,用CSS你就可以毫不麻煩的預(yù)載你的圖片。2009-10-28