国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼)

這篇具有很好參考價(jià)值的文章主要介紹了【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼)。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。



寫在前面

今天其實(shí)還是有點(diǎn)期待6月份城市賽道的成績(jī)公布,但是可能因?yàn)槌霈F(xiàn)城市太多等問題,官方也還在快馬加鞭的統(tǒng)計(jì)中,我也趁機(jī)再發(fā)一篇前端的文章了,其實(shí)在很多系統(tǒng)里面我們都看到過各種各樣的加載中樣式,但是總有些顯得平平無奇,今天我就統(tǒng)計(jì)了28種load加載動(dòng)畫特效給大家,希望能滿足大家的需求。

涉及知識(shí)點(diǎn)

CSS3實(shí)現(xiàn)多種load加載效果,純CSS3實(shí)現(xiàn)多種加載中效果,純CSS3實(shí)現(xiàn)28種加載動(dòng)態(tài)效果,頁面實(shí)現(xiàn)loading效果,好看的loading動(dòng)態(tài)特效,animation與transform的靈活應(yīng)用。
版權(quán)聲明:此文原創(chuàng)于CSDN博主-《拄杖盲學(xué)輕聲碼》,主頁有很多分享的代碼,期待您的訪問。

效果展示

其實(shí)這個(gè)就是為了讓更多的人能夠選擇性是否繼續(xù)閱讀這篇文章,為大家精準(zhǔn)定位自己想要的demo,文尾有完整代碼包下載鏈接。
【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼),CSS,前端開發(fā),web頁面開發(fā)-源碼demo,css,前端


1、Loading節(jié)點(diǎn)的創(chuàng)建

在制作這個(gè)頁面的時(shí)候首先就是構(gòu)思,正常demo都是拿一個(gè)dom節(jié)點(diǎn)來示例,我選擇整4個(gè)為代表,這樣的話看著舒服點(diǎn)。
首先創(chuàng)建四個(gè)div,針對(duì)div設(shè)置居中展示,其中dom節(jié)點(diǎn)如下:

<div class="loader">
  <div class="loader-inner">
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>
<div class="loader">
  <div class="loader-inner">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>
<div class="loader">
  <div class="loader-inner">
    <div></div>
  </div>
</div>
<div class="loader">
  <div class="loader-inner">
    <div></div>
    <div></div>
  </div>
</div>

每一個(gè)loader都是表示裝的一個(gè)加載中的效果,設(shè)置一個(gè)背景色效果如下:
【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼),CSS,前端開發(fā),web頁面開發(fā)-源碼demo,css,前端

然后再在白色的方塊內(nèi)設(shè)置樣式,因?yàn)樾Ч煌?,所以我采用不同的class名來設(shè)置不同的樣式屬性。
版權(quán)聲明:此文原創(chuàng)于CSDN博主-《拄杖盲學(xué)輕聲碼》,主頁有很多分享的代碼,期待您的訪問。

2、部分效果的實(shí)現(xiàn)源碼

1)三點(diǎn)加載動(dòng)畫

主要使用了animation屬性的設(shè)置,也是CSS3中具有代表性的動(dòng)畫特征,它可以實(shí)現(xiàn)動(dòng)畫的時(shí)間、反向、次數(shù),甚至支持反向動(dòng)畫等。

語法:animation: name duration timing-function delay iteration-count direction fill-mode play-state;

其中屬性說明如下:

說明
animation-name 指定要綁定到選擇器的關(guān)鍵幀的名稱
animation-duration 動(dòng)畫指定需要多少秒或毫秒完成
animation-timing-function 設(shè)置動(dòng)畫將如何完成一個(gè)周期
animation-delay 設(shè)置動(dòng)畫在啟動(dòng)前的延遲間隔。
animation-iteration-count 定義動(dòng)畫的播放次數(shù)。
animation-direction 指定是否應(yīng)該輪流反向播放動(dòng)畫。
animation-fill-mode 規(guī)定當(dāng)動(dòng)畫不播放時(shí)(當(dāng)動(dòng)畫完成時(shí),或當(dāng)動(dòng)畫有一個(gè)延遲未開始播放時(shí)),要應(yīng)用到元素的樣式。
animation-play-state 指定動(dòng)畫是否正在運(yùn)行或已暫停。
initial 設(shè)置屬性為其默認(rèn)值。
inherit 從父元素繼承屬性。

在我這個(gè)實(shí)例當(dāng)中我主要設(shè)置的代碼如下:

Html代碼

<div class="loader">
  <div class="loader-inner ball-pulse">
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>

CSS樣式代碼

.ball-pulse>div:nth-child(1) {
        -webkit-animation: scale 0.75s 0.12s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: scale 0.75s 0.12s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.ball-pulse>div:nth-child(2) {
        -webkit-animation: scale 0.75s 0.24s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: scale 0.75s 0.24s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.ball-pulse>div:nth-child(3) {
        -webkit-animation: scale 0.75s 0.36s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: scale 0.75s 0.36s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.ball-pulse>div {
        background-color: #fff;
        width: 15px;
        height: 15px;
        border-radius: 100%;
        margin: 2px;
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
        display: inline-block;
}

添加樣式后的效果如下:
【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼),CSS,前端開發(fā),web頁面開發(fā)-源碼demo,css,前端

2)圓點(diǎn)矩陣加載特效

其實(shí)這個(gè)和上面的有點(diǎn)像,如果說第一個(gè)是一維的,那它就算二維的,是用了9個(gè)圓點(diǎn)形成的一個(gè)正方形矩陣,然后通過不同時(shí)間段各個(gè)圓點(diǎn)大小的變化形成的一種動(dòng)態(tài)加載效果。
Html設(shè)置了9個(gè)子元素div,樣式方面主要使用了css的animation-duration來設(shè)置不同節(jié)點(diǎn)的動(dòng)畫完成時(shí)間、animation-delay設(shè)置延遲間隔及transform設(shè)置縮放。如下所示代碼:

Html代碼

<div class="loader">
  <div class="loader-inner ball-grid-pulse">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>

CSS樣式代碼

@keyframes ball-grid-pulse {
        0% {
                -webkit-transform: scale(1);
                transform: scale(1);
        }

        50% {
                -webkit-transform: scale(0.5);
                transform: scale(0.5);
                opacity: 0.7;
        }

        100% {
                -webkit-transform: scale(1);
                transform: scale(1);
                opacity: 1;
        }
}

.ball-grid-pulse {
        width: 57px;
}

.ball-grid-pulse>div:nth-child(1) {
        -webkit-animation-delay: -0.06s;
        animation-delay: -0.06s;
        -webkit-animation-duration: 0.72s;
        animation-duration: 0.72s;
}

.ball-grid-pulse>div:nth-child(2) {
        -webkit-animation-delay: 0.25s;
        animation-delay: 0.25s;
        -webkit-animation-duration: 1.02s;
        animation-duration: 1.02s;
}

.ball-grid-pulse>div:nth-child(3) {
        -webkit-animation-delay: -0.17s;
        animation-delay: -0.17s;
        -webkit-animation-duration: 1.28s;
        animation-duration: 1.28s;
}

.ball-grid-pulse>div:nth-child(4) {
        -webkit-animation-delay: 0.48s;
        animation-delay: 0.48s;
        -webkit-animation-duration: 1.42s;
        animation-duration: 1.42s;
}

.ball-grid-pulse>div:nth-child(5) {
        -webkit-animation-delay: 0.31s;
        animation-delay: 0.31s;
        -webkit-animation-duration: 1.45s;
        animation-duration: 1.45s;
}

.ball-grid-pulse>div:nth-child(6) {
        -webkit-animation-delay: 0.03s;
        animation-delay: 0.03s;
        -webkit-animation-duration: 1.18s;
        animation-duration: 1.18s;
}

.ball-grid-pulse>div:nth-child(7) {
        -webkit-animation-delay: 0.46s;
        animation-delay: 0.46s;
        -webkit-animation-duration: 0.87s;
        animation-duration: 0.87s;
}

.ball-grid-pulse>div:nth-child(8) {
        -webkit-animation-delay: 0.78s;
        animation-delay: 0.78s;
        -webkit-animation-duration: 1.45s;
        animation-duration: 1.45s;
}

.ball-grid-pulse>div:nth-child(9) {
        -webkit-animation-delay: 0.45s;
        animation-delay: 0.45s;
        -webkit-animation-duration: 1.06s;
        animation-duration: 1.06s;
}

.ball-grid-pulse>div {
        background-color: #fff;
        width: 15px;
        height: 15px;
        border-radius: 100%;
        margin: 2px;
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
        display: inline-block;
        float: left;
        -webkit-animation-name: ball-grid-pulse;
        animation-name: ball-grid-pulse;
        -webkit-animation-iteration-count: infinite;
        animation-iteration-count: infinite;
        -webkit-animation-delay: 0;
        animation-delay: 0;
}

頁面呈現(xiàn)效果如下所示:
【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼),CSS,前端開發(fā),web頁面開發(fā)-源碼demo,css,前端

3)圓形軌跡加載動(dòng)畫

這個(gè)相比上兩個(gè)沒有那么的復(fù)雜,主要用一個(gè)div就可以完成效果,主要是利用了animation-fill-mode和animation的樣式設(shè)置,針對(duì)動(dòng)畫設(shè)置了transform的角度旋轉(zhuǎn)動(dòng)畫rotate設(shè)置。

Html代碼

 <div class="loader">
        <div class="loader-inner ball-clip-rotate">
          <div></div>
        </div>
      </div>

Css樣式代碼

.ball-clip-rotate>div {
        background-color: #fff;
        width: 15px;
        height: 15px;
        border-radius: 100%;
        margin: 2px;
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
        border: 2px solid #fff;
        border-bottom-color: transparent;
        height: 25px;
        width: 25px;
        background: transparent !important;
        display: inline-block;
        -webkit-animation: rotate 0.75s 0s linear infinite;
        animation: rotate 0.75s 0s linear infinite;
}

@keyframes rotate {
        0% {
                -webkit-transform: rotate(0deg) scale(1);
                transform: rotate(0deg) scale(1);
        }

        50% {
                -webkit-transform: rotate(180deg) scale(0.6);
                transform: rotate(180deg) scale(0.6);
        }

        100% {
                -webkit-transform: rotate(360deg) scale(1);
                transform: rotate(360deg) scale(1);
        }
}

頁面實(shí)現(xiàn)效果如下:
【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼),CSS,前端開發(fā),web頁面開發(fā)-源碼demo,css,前端

4)柵欄式加載動(dòng)畫

其實(shí)這個(gè)是我們公司現(xiàn)階段用的一個(gè)效果,有點(diǎn)像手風(fēng)琴的感覺,其中設(shè)置了5根小柱子,然后通過設(shè)置這些柱子的高低動(dòng)畫,從而形成一種高低起伏的加載動(dòng)畫。
主要和前面一樣,核心在于animation的樣式設(shè)置。

Html代碼

<div class="loader">
  <div class="loader-inner line-scale">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>

Css樣式代碼

.line-scale>div:nth-child(1) {
        -webkit-animation: line-scale 1s 0.1s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: line-scale 1s 0.1s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.line-scale>div:nth-child(2) {
        -webkit-animation: line-scale 1s 0.2s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: line-scale 1s 0.2s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.line-scale>div:nth-child(3) {
        -webkit-animation: line-scale 1s 0.3s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: line-scale 1s 0.3s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.line-scale>div:nth-child(4) {
        -webkit-animation: line-scale 1s 0.4s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: line-scale 1s 0.4s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.line-scale>div:nth-child(5) {
        -webkit-animation: line-scale 1s 0.5s infinite cubic-bezier(.2, .68, .18, 1.08);
        animation: line-scale 1s 0.5s infinite cubic-bezier(.2, .68, .18, 1.08);
}

.line-scale>div {
        background-color: #fff;
        width: 4px;
        height: 35px;
        border-radius: 2px;
        margin: 2px;
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
        display: inline-block;
}

頁面效果如下所示:
【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼),CSS,前端開發(fā),web頁面開發(fā)-源碼demo,css,前端

3、完整28種特效獲取方式

  • 網(wǎng)盤下載(第四章節(jié)有鏈接路徑,可自行下載)

  • 留言獲?。梢栽诓┲鞯脑u(píng)論區(qū)留言,切記要留下郵箱喲,博主看到后第一時(shí)間發(fā)出)

4、源碼下載區(qū)

1)百度網(wǎng)盤

鏈接:https://pan.baidu.com/s/1OSRhPOxonxWDlGxAN_0U1g
提取碼:hdd6

2)123云盤

鏈接:https://www.123pan.com/s/ZxkUVv-V3I4.html
提取碼:hdd6

3)郵箱留言

評(píng)論區(qū)留下您的郵箱賬號(hào),博主看到第一時(shí)間發(fā)給您,祝您生活愉快!


總結(jié)

以上就是今天要講的內(nèi)容,本文主要介紹了CSS3的特效應(yīng)用,主要實(shí)現(xiàn)了CSS3實(shí)現(xiàn)多種加載中效果,CSS3實(shí)現(xiàn)28種加載動(dòng)態(tài)效果,頁面實(shí)現(xiàn)loading效果,好看的loading動(dòng)態(tài)特效,也期待大家一起進(jìn)步哈,2023年一起加油!?。?mark hidden color="red">文章來源:http://www.zghlxwxcb.cn/news/detail-552538.html

版權(quán)聲明:此文原創(chuàng)于CSDN博主-《拄杖盲學(xué)輕聲碼》,主頁有很多分享的代碼,期待您的訪問。文章來源地址http://www.zghlxwxcb.cn/news/detail-552538.html

到了這里,關(guān)于【CSS加載動(dòng)畫特效】28種純CSS實(shí)現(xiàn)的加載loading動(dòng)態(tài)特效(附源碼)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 純css3實(shí)現(xiàn)小雞從雞蛋破殼而出動(dòng)畫特效

    純css3實(shí)現(xiàn)小雞從雞蛋破殼而出動(dòng)畫特效

    實(shí)現(xiàn)一個(gè)使用純css3實(shí)現(xiàn)小雞破殼的效果 示例效果如下所示 實(shí)現(xiàn)這個(gè)小雞破殼,使用css3,結(jié)合動(dòng)畫關(guān)鍵幀就可以實(shí)現(xiàn),結(jié)合元素絕對(duì)定位,使用 div + css 進(jìn)行繪制 當(dāng)鼠標(biāo)移上去時(shí),實(shí)現(xiàn)蛋黃與蛋殼的分離,使用css3中的 transform ,變換,垂直反方向上,平移就可以實(shí)現(xiàn) 村民私自搭橋收費(fèi)被

    2024年02月16日
    瀏覽(24)
  • 快六一啦,學(xué)習(xí)CSS3實(shí)現(xiàn)一個(gè)冰淇淋動(dòng)畫特效

    快六一啦,學(xué)習(xí)CSS3實(shí)現(xiàn)一個(gè)冰淇淋動(dòng)畫特效

    快六一啦,小時(shí)候頂多吃個(gè)小冰棍,或者是那種小冰袋,現(xiàn)在的小朋友真是好,動(dòng)不動(dòng)就能吃到冰淇淋,今天用CSS3實(shí)現(xiàn)一個(gè)冰淇淋的動(dòng)畫特效吧 ? 目錄 實(shí)現(xiàn)思路 桶身的實(shí)現(xiàn) 冰淇淋身體的實(shí)現(xiàn) 五彩顆粒的實(shí)現(xiàn) HTML源碼 CSS3源碼 最后 實(shí)現(xiàn)思路 本文采用多DOM的方式進(jìn)行布局,冰

    2024年02月06日
    瀏覽(27)
  • 看不上日全食了,學(xué)習(xí)CSS3,實(shí)現(xiàn)一個(gè)日全食的動(dòng)畫特效

    看不上日全食了,學(xué)習(xí)CSS3,實(shí)現(xiàn)一個(gè)日全食的動(dòng)畫特效

    看新聞?wù)f,今年全球唯一一次日全食將于北京時(shí)間4月9日凌晨在北美洲地區(qū)上演??磥砟沁呂沂侨ゲ怀闪?,日全食也看不見了,不過我可以用CSS3實(shí)現(xiàn)一個(gè)日全食的動(dòng)畫特效。一起來看一下吧。 ? 目錄 1. 實(shí)現(xiàn)思路 2. 天空的生成已經(jīng)漸變 3 太陽的生成以及漸變 4 月亮的生成以及

    2024年04月09日
    瀏覽(18)
  • CSS3實(shí)現(xiàn)動(dòng)畫加載效果
  • 輕松掌握 CSS,實(shí)現(xiàn) loading 加載中的多種形式

    輕松掌握 CSS,實(shí)現(xiàn) loading 加載中的多種形式

    現(xiàn)如今網(wǎng)頁越來越趨近于動(dòng)畫,相信大家平時(shí)瀏覽網(wǎng)頁或多或少都能看到一些動(dòng)畫效果,今天我們來做一個(gè)有意思的動(dòng)畫效果,純 css 實(shí)現(xiàn) loading 加載中(多種展現(xiàn)形式),下面一起看看吧。 實(shí)現(xiàn)效果 代碼如下 實(shí)現(xiàn)效果 代碼如下 實(shí)現(xiàn)效果 代碼如下 實(shí)現(xiàn)效果 代碼如下 實(shí)現(xiàn)

    2024年04月24日
    瀏覽(24)
  • 19.CSS雨云動(dòng)畫特效

    19.CSS雨云動(dòng)畫特效

    2024年02月10日
    瀏覽(19)
  • css之文字連續(xù)光影特效、動(dòng)畫、scss
  • elementui 自定義loading動(dòng)畫加載層

    elementui 自定義loading動(dòng)畫加載層

    elementui 自定義loading動(dòng)畫加載層。 main.js中添加 使用: element官網(wǎng): Loading 還可以以服務(wù)的方式調(diào)用。引入 Loading 服務(wù): import { Loading } from ‘element-ui’ 在需要調(diào)用時(shí): Loading.service(options); 其中 options 參數(shù)為 Loading 的配置項(xiàng),具體見下表。LoadingService 會(huì)返回一個(gè) Loading 實(shí)例,可通

    2024年02月09日
    瀏覽(23)
  • vue element-ui Loading加載事件的使用以及自定義Loading加載動(dòng)畫

    ?elemen-ui官方使用 loading加載事件屬性解釋 element-loading-text 在綁定了 v-loading 指令的元素上添加 element-loading-text 屬性,其值會(huì)被渲染為加載文案,并顯示在加載圖標(biāo)的下方 element-loading-spinner 和 element-loading-background 屬性分別用來設(shè)定圖標(biāo)類名和背景色值。 作為小白,這次主要

    2024年02月11日
    瀏覽(26)
  • CSS3模擬小倉鼠一直奔跑的動(dòng)畫特效

    CSS3模擬小倉鼠一直奔跑的動(dòng)畫特效

    最近在麗澤橋的花鳥蟲魚市場(chǎng)看見 小倉鼠一直在奔跑 ,覺得它好累啊,但是卻又樂此不疲的在跑著,就像我們這些打工族一樣。之前見過有人把手機(jī)放在小倉鼠的滾輪上記步數(shù),也是挺聰明的。今天就通過 CSS3 來實(shí)現(xiàn)一只一直奔跑著的小倉鼠。 ? 目錄 1. 實(shí)現(xiàn)思路 2.? 圓圈的

    2023年04月09日
    瀏覽(17)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包