愛心加載

效果展示:


愛心.gif
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>愛心加載</title>
    <style>
    html,body {
        width: 100%;
        height: 100%;
        margin: 0;
        background-color: #ccc;
    }
    .container {
        display: flex;
        width: 100%;
        height: 100%;
        justify-content: center;
        align-items: center;

    }
    .header {
        position: relative;
        width: 138px;
        /* display: flex; */
    }
    [class*='header-']{
        position: absolute;
        width: 10px;
        height: 10px;
        top: -5px;
        border-radius: 5px;
        
    }
    .header-0,
    .header-8 {
        animation: header-0 3.2s infinite;
    }
    .header-1,
    .header-7 {
        animation: header-1 3.2s infinite;
    }
    .header-2,
    .header-6 {
        animation: header-2 3.2s infinite;
    }
    .header-3,
    .header-5 {
        animation: header-3 3.2s infinite;
    }
    .header-4 {
        animation: header-4 3.2s infinite;
    }

@keyframes header-0 {
    0%,
    10%,
    90%,
    100% {
        height: 10px;
        top: -5px;
    }
    45%,
    55% {
        height: 30px;
        top: -10px;
    }
}
@keyframes header-1 {
    0%,
    10%,
    90%,
    100% {
        height: 10px;
        top: -5px;
    }
    45%,
    55% {
        height: 60px;
        top: -31px;
    }
}
@keyframes header-2 {
    0%,
    10%,
    90%,
    100% {
        height: 10px;
        top: -5px;
    }
    45%,
    55% {
        height: 80px;
        top: -37px;
    }
}
@keyframes header-3 {
    0%,
    10%,
    90%,
    100% {
        height: 10px;
        top: -5px;
    }
    45%,
    55% {
        height: 90px;
        top: -31px;
    }
}
@keyframes header-4 {
    0%,
    10%,
    90%,
    100% {
        height: 10px;
        top: -5px;
    }
    45%,
    55% {
        height: 94px;
        top: -23px;
    }
}
.header-0 {
    left: 0;
    animation-delay: 0s;
    background: #92fe9d;

}
.header-1 {
    left: 16px;
    animation-delay: 0.15s;
    background: #00c9ff;
}
.header-2 {
    left: 32px;
    animation-delay: 0.3s;
    background: #ff758c;
}
.header-3 {
    left: 48px;
    animation-delay: 0.45s;
    background: #ff7eb3;
}
.header-4 {
    left: 66px;
    animation-delay: 0.6s;
    background: #fa71cd;
}
.header-5 {
    left: 82px;
    animation-delay: 0.75s;
    background: #6f86d6;
}
.header-6 {
    left: 98px;
    animation-delay: 0.9s;
    background: #f9f586;
}

.header-7 {
    left: 114px;
    animation-delay: 1.05s;
    background: #b1f4cf;
}
.header-8 {
    left: 130px;
    animation-delay: 1.2s;
    background: #fef9d7;
}
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="header-0"></div>
            <div class="header-1"></div>
            <div class="header-2"></div>
            <div class="header-3"></div>
            <div class="header-4"></div>
            <div class="header-5"></div>
            <div class="header-6"></div>
            <div class="header-7"></div>
            <div class="header-8"></div>
        </div>
    </div>
</body>
</html>

效果展示:


加載.gif
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        background-color: #000;

    }
.loader {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(45deg,transparent,transparent 40%,#e5f403);
    animation: animate 1.5s linear infinite;
}
@keyframes animate {
    0% {
        transform: rotate(0deg);
        filter: hue-rotate(0deg);
    }
 
    50% {
        background: linear-gradient(45deg,transparent,transparent 40%,#ff5858);
        filter: hue-rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
        filter: hue-rotate(0deg);
        background: linear-gradient(45deg,transparent,transparent 40%,#ff0844);
    }
}
.loader::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    background: #000;
    border-radius: 50%;
    z-index: 1000;

}
.loader::after {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    background: linear-gradient(45deg,transparent,transparent 40%, #feada6);
    border-radius: 50%;
    z-index: 1;
    filter:blur(30px);

}
    </style>
</head>
<body>
    <div class="loader"></div>
</body>
</html>

效果展示:


漸變1.gif
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    * {
        margin: 0;
        padding: 0;
    }
    html,
    body {
        width: 100vw;
        height: 100vh;
    }
    body{
        font-family: 'montserrat';
        background: linear-gradient(125deg,#2c3e50,#27ac60,#2980b9,#8e44ad) no-repeat;
        background-size: 400%;
        animation: bganimation 15s infinite;
    }
    .text {
        color: white;
        text-align: center;
        text-transform: uppercase;
        margin: 350px 0;
        font-size: 22px;
    }
    @keyframes bganimation {
        0% {
            background-position: 0% 50%;
        }
        50% {
            background-position: 100% 50%;
        }
        100% {
            background-position: 0% 50%;
        }
      
    }
    </style>
</head>
<body>
    <div class="text">
        [HTML&CSS]五分鐘實(shí)現(xiàn)背景不停漸變效果
    </div>
</body>
</html>[圖片上傳失敗...(image-b1c46d-1584589507684)]

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子坎怪,更是在濱河造成了極大的恐慌,老刑警劉巖揽乱,帶你破解...
    沈念sama閱讀 222,252評(píng)論 6 516
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件芝此,死亡現(xiàn)場離奇詭異,居然都是意外死亡朝群,警方通過查閱死者的電腦和手機(jī)根灯,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,886評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門径缅,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人烙肺,你說我怎么就攤上這事芥驳。” “怎么了茬高?”我有些...
    開封第一講書人閱讀 168,814評(píng)論 0 361
  • 文/不壞的土叔 我叫張陵兆旬,是天一觀的道長。 經(jīng)常有香客問我怎栽,道長丽猬,這世上最難降的妖魔是什么宿饱? 我笑而不...
    開封第一講書人閱讀 59,869評(píng)論 1 299
  • 正文 為了忘掉前任,我火速辦了婚禮脚祟,結(jié)果婚禮上谬以,老公的妹妹穿的比我還像新娘。我一直安慰自己由桌,他們只是感情好为黎,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,888評(píng)論 6 398
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著行您,像睡著了一般铭乾。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上娃循,一...
    開封第一講書人閱讀 52,475評(píng)論 1 312
  • 那天炕檩,我揣著相機(jī)與錄音,去河邊找鬼捌斧。 笑死笛质,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的捞蚂。 我是一名探鬼主播妇押,決...
    沈念sama閱讀 41,010評(píng)論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼姓迅!你這毒婦竟也來了敲霍?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,924評(píng)論 0 277
  • 序言:老撾萬榮一對(duì)情侶失蹤队贱,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后潭袱,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體柱嫌,經(jīng)...
    沈念sama閱讀 46,469評(píng)論 1 319
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,552評(píng)論 3 342
  • 正文 我和宋清朗相戀三年屯换,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片彤悔。...
    茶點(diǎn)故事閱讀 40,680評(píng)論 1 353
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡嘉抓,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出晕窑,到底是詐尸還是另有隱情抑片,我是刑警寧澤,帶...
    沈念sama閱讀 36,362評(píng)論 5 351
  • 正文 年R本政府宣布杨赤,位于F島的核電站敞斋,受9級(jí)特大地震影響截汪,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜植捎,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 42,037評(píng)論 3 335
  • 文/蒙蒙 一衙解、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧焰枢,春花似錦蚓峦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,519評(píng)論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至拟淮,卻和暖如春干茉,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背很泊。 一陣腳步聲響...
    開封第一講書人閱讀 33,621評(píng)論 1 274
  • 我被黑心中介騙來泰國打工角虫, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人委造。 一個(gè)月前我還...
    沈念sama閱讀 49,099評(píng)論 3 378
  • 正文 我出身青樓戳鹅,卻偏偏與公主長得像,于是被迫代替她去往敵國和親昏兆。 傳聞我的和親對(duì)象是個(gè)殘疾皇子枫虏,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,691評(píng)論 2 361

推薦閱讀更多精彩內(nèi)容