CSS3輕松實(shí)現(xiàn)清新 Loading 效果的簡(jiǎn)單實(shí)例

至今HTML5中國(guó)已經(jīng)為大家分享過幾百種基于 CSS3 的Loading加載動(dòng)畫,效果酷炫代碼簡(jiǎn)潔,非常值得學(xué)習(xí)借鑒;今天就先給大家分享兩個(gè)常用的CSS3的Loading的案例。
第一種效果:
HTML部分
- <div class="loading">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
CSS3部分
- .loading{
- width: 80px;
- height: 40px;
- margin: 0 auto;
- margin-top:100px;
- }
- .loading span{
- display: inline-block;
- width: 8px;
- height: 100%;
- border-radius: 4px;
- background: lightgreen;
- -webkit-animation: load 1s ease infinite;
- }
- @-webkit-keyframes load{
- 0%,100%{
- height: 40px;
- background: lightgreen;
- }
- 50%{
- height: 70px;
- margin: -15px 0;
- background: lightblue;
- }
- }
- .loading span:nth-child(2){
- -webkit-animation-delay:0.2s;
- }
- .loading span:nth-child(3){
- -webkit-animation-delay:0.4s;
- }
- .loading span:nth-child(4){
- -webkit-animation-delay:0.6s;
- }
- .loading span:nth-child(5){
- -webkit-animation-delay:0.8s;
- }
第二種效果:
HTML部分
- <div class="loadEffect">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
CSS3部分
- .loadEffect{
- width: 100px;
- height: 100px;
- position: relative;
- margin: 0 auto;
- margin-top:100px;
- }
- .loadEffect span{
- display: inline-block;
- width: 16px;
- height: 16px;
- border-radius: 50%;
- background: lightgreen;
- position: absolute;
- -webkit-animation: load 1.04s ease infinite;
- }
- @-webkit-keyframes load{
- 0%{
- opacity: 1;
- }
- 100%{
- opacity: 0.2;
- }
- }
- .loadEffect span:nth-child(1){
- left: 0;
- top: 50%;
- margin-top:-8px;
- -webkit-animation-delay:0.13s;
- }
- .loadEffect span:nth-child(2){
- left: 14px;
- top: 14px;
- -webkit-animation-delay:0.26s;
- }
- .loadEffect span:nth-child(3){
- left: 50%;
- top: 0;
- margin-left: -8px;
- -webkit-animation-delay:0.39s;
- }
- .loadEffect span:nth-child(4){
- top: 14px;
- rightright:14px;
- -webkit-animation-delay:0.52s;
- }
- .loadEffect span:nth-child(5){
- rightright: 0;
- top: 50%;
- margin-top:-8px;
- -webkit-animation-delay:0.65s;
- }
- .loadEffect span:nth-child(6){
- rightright: 14px;
- bottombottom:14px;
- -webkit-animation-delay:0.78s;
- }
- .loadEffect span:nth-child(7){
- bottombottom: 0;
- left: 50%;
- margin-left: -8px;
- -webkit-animation-delay:0.91s;
- }
- .loadEffect span:nth-child(8){
- bottombottom: 14px;
- left: 14px;
- -webkit-animation-delay:1.04s;
- }
上面這兩個(gè)都是大家常用的加載效果,下面的就不依依的現(xiàn)實(shí)代碼了,有需要的小伙伴請(qǐng)給我留言!
更多效果如下所示:
第三種loading效果
第四種loading效果
第五種loading效果
第六種loading效果
第七種loading效果
這些效果都是用CSS3實(shí)現(xiàn)的,是不是很厲害,想要學(xué)習(xí)的小伙伴記得給我留言哦!如果大家有更牛氣的效果記得偷偷的發(fā)給我哦!
以上這篇CSS3輕松實(shí)現(xiàn)清新 Loading 效果的簡(jiǎn)單實(shí)例就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
- 本篇文章主要介紹了詳解純CSS3制作的20種loading動(dòng)效,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-07-05
- 這篇文章主要為大家詳細(xì)介紹了CSS3實(shí)現(xiàn)10種Loading效果,效果實(shí)現(xiàn)簡(jiǎn)單新穎,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-07-11
使用CSS3制作餅狀旋轉(zhuǎn)載入效果的實(shí)例
這篇文章主要介紹了使用CSS3制作餅狀旋轉(zhuǎn)載入效果的實(shí)例,作者生動(dòng)地將其比作攤雞蛋煎餅般的動(dòng)畫效果,需要的朋友可以參考下2015-06-23淺析與CSS3的loading動(dòng)畫加載相關(guān)的transition優(yōu)化
這篇文章主要介紹了淺析與CSS3的loading動(dòng)畫加載相關(guān)的transition優(yōu)化,包括height等相關(guān)參數(shù)的調(diào)試方法分析,需要的朋友可以參考下2015-05-188款使用 CSS3 實(shí)現(xiàn)超炫的 Loading(加載)的動(dòng)畫效果
本文給大家總結(jié)分享了8款使用 CSS3 實(shí)現(xiàn)超炫的 Loading(加載)的動(dòng)畫效果,十分的炫酷,也非常實(shí)用,這里推薦給小伙伴們,希望大家能夠喜歡。2015-03-17純CSS3實(shí)現(xiàn)的8種Loading動(dòng)畫效果
這篇文章主要介紹了純CSS3實(shí)現(xiàn)的8種Loading動(dòng)畫效果,效果簡(jiǎn)潔、超酷、符合當(dāng)前前端的流行風(fēng)格,需要的朋友可以參考下2014-07-05使用css3實(shí)現(xiàn)超炫的loading加載動(dòng)畫效果
這篇文章主要介紹了使用css3實(shí)現(xiàn)超炫的loading加載動(dòng)畫效果,需要的朋友可以參考下2014-05-07css3如何繪制一個(gè)圓圓的loading轉(zhuǎn)圈動(dòng)畫
這篇文章主要介紹了css3如何繪制一個(gè)圓圓的loading圈的相關(guān)資料,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-01-09