純CSS特效-404頁面(動(dòng)畫)

首先看下效果圖

純CSS特效-404頁面(動(dòng)畫)
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <style type="text/css">
    *,
    *:after,
    *:before {
      box-sizing: border-box;
    }

    html {
      background: #23508a;
      background: radial-gradient(ellipse at center, #23508a 0%, #1b3b62 50%, #1a365b 100%);
      font-family: arial;
      min-width: 400px;
    }

    body {
      width: 100%;
      height: 100vh;
      margin: 0;
      background: radial-gradient(ellipse at center, #73859a 1%, rgba(114, 132, 152, 0) 2%, rgba(0, 0, 0, 0) 100%), radial-gradient(ellipse at center, #73859a 1%, rgba(114, 132, 152, 0) 2%, rgba(0, 0, 0, 0) 100%), radial-gradient(ellipse at center, rgba(115, 133, 154, 0.5) 1%, rgba(114, 132, 152, 0) 2%, rgba(0, 0, 0, 0) 100%);
      background-size: 250px 250px, 100px 100px, 60px 60px;
      background-repeat: repeat;
    }

    .figure {
      position: fixed;
      left: 50%;
      top: 50%;
      -webkit-transform: translate(-50%, -65%);
      transform: translate(-50%, -65%);
    }

    .error-no {
      font-size: 200px;
      font-weight: bold;
      display: -webkit-box;
      display: flex;
      -webkit-box-align: center;
      align-items: center;
      -webkit-box-pack: center;
      justify-content: center;
      color: #68e3e9;
      text-shadow: -2px 4px 2px rgba(0, 0, 0, 0.5);
    }

    .moon {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      background: #fff;
      position: relative;
      display: inline-block;
      z-index: 10;
      overflow: hidden;
      box-shadow: -20px 0 20px #e9e9e9 inset;
      border: 1px solid #68e3e9;
    }

    .moon:after {
      content: '';
      position: absolute;
      left: 75px;
      top: 70%;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      color: #e9e9e9;
      background: currentcolor;
      -webkit-animation: 5s spin linear infinite;
      animation: 5s spin linear infinite;
      box-shadow: -30px -50px 0 20px, 50px -30px 0 -8px, 50px -90px 0 2px, 100px -90px 0 0px, 100px -40px 0 25px, 150px -15px 0 0px, 240px 15px 0 4px, 230px -80px 0 2px, 200px -20px 0 16px, 350px 0 0, 320px -50px 0 20px, 400px -30px 0 -8px, 400px -90px 0 2px;
    }

    .mj {
      position: relative;
      margin: auto;
      z-index: 30;
      width: 60px;
      -webkit-transform: scale(0.6) translatey(70%);
      transform: scale(0.6) translatey(70%);
    }

    .mj .head {
      width: 30px;
      height: 35px;
      background: #feead6;
      position: relative;
      border-radius: 0 0 8px 0;
      -webkit-transform: rotate(20deg);
      transform: rotate(20deg);
      left: 10px;
      top: 5px;
      z-index: 5;
    }

    .mj .head:before {
      content: '';
      background: #000;
      width: 35px;
      height: 30px;
      position: absolute;
      left: -2px;
      bottom: 100%;
    }

    .mj .head:after {
      content: '';
      height: 3px;
      width: 60px;
      background: #000;
      position: absolute;
      left: 50%;
      -webkit-transform: translatex(-50%);
      transform: translatex(-50%);
      bottom: 100%;
    }

    .mj .head .nose {
      position: absolute;
      left: 100%;
      top: 10px;
      border-width: 8px 0 0 4px;
      border-style: solid;
      border-color: transparent #feead6;
    }

    .mj .hair {
      background: #151515;
      width: 12px;
      height: 20px;
      position: relative;
      left: -2px;
      border-radius: 0 0 6px 0;
    }

    .mj .hair .ponytail {
      position: absolute;
      background: #151515;
      width: 14px;
      height: 30px;
      border-radius: 50%;
      -webkit-transform: rotate(20deg);
      transform: rotate(20deg);
      left: -60%;
      top: 90%;
      -webkit-transform-origin: 100% 0%;
      transform-origin: 100% 0%;
      -webkit-animation: ponytail 1s infinite alternate;
      animation: ponytail 1s infinite alternate;
    }

    .mj .hair .ponytail:after {
      content: '';
      background: #151515;
      width: 9px;
      height: 14px;
      position: absolute;
      left: 10%;
      -webkit-transform: rotate(21deg);
      transform: rotate(21deg);
      top: 70%;
      border-radius: 10px 0 50%;
    }

    .mj .hair .frontpony {
      position: absolute;
      width: 8px;
      height: 12px;
      border-left: 3px solid;
      border-bottom: 2px solid;
      left: 22px;
      top: 0px;
      -webkit-transform: skew(35deg, 0) rotate(35deg);
      transform: skew(35deg, 0) rotate(35deg);
      border-radius: 0 0 0 43%;
      color: #151515;
    }

    .mj .hair .frontpony:after {
      content: '';
      width: 10px;
      height: 10px;
      position: absolute;
      border-right: 1px solid;
      border-bottom: 1px solid;
      left: -4px;
      top: 13px;
      -webkit-transform: skew(0deg, -47deg) rotate(-28deg);
      transform: skew(0deg, -47deg) rotate(-28deg);
      border-radius: 0 0 7px 0;
    }

    .body {
      width: 35px;
      background: #feead6;
      position: relative;
    }

    .body:after {
      content: '';
      position: absolute;
      right: 0;
      top: 0;
      border-style: solid;
      border-width: 5px 8px 15px 0px;
      border-color: transparent #feead6 transparent transparent;
    }

    .body .jacket {
      background: #000;
      height: 70px;
      position: relative;
    }

    .body .jacket:before {
      content: '';
      position: absolute;
      top: 50px;
      left: -10px;
      width: 45px;
      height: 40px;
      background: #000;
      border-radius: 0 50px 50px 50px;
      -webkit-transform: rotate(25deg);
      transform: rotate(25deg);
      z-index: 5;
      -webkit-animation: 1s jacket infinite alternate;
      animation: 1s jacket infinite alternate;
    }

    .body .jacket:after {
      content: '';
      position: absolute;
      left: 95%;
      width: 6px;
      height: 115%;
      top: 0;
      background: #000;
      z-index: -5;
      border-radius: 0 0 100px 0;
    }

    .hand {
      width: 15px;
      height: 40px;
      background: #151515;
      top: 10px;
      left: -5px;
      margin: auto;
      position: relative;
      border-radius: 10px 10px 0 0;
      z-index: 10;
      -webkit-transform: rotate(15deg);
      transform: rotate(15deg);
    }

    .hand:after {
      content: '';
      width: 100%;
      position: absolute;
      top: 38px;
      left: -1px;
      background: #151515;
      height: 40px;
      -webkit-transform: rotate(-35deg);
      transform: rotate(-35deg);
      -webkit-transform-origin: 0 0 0;
      transform-origin: 0 0 0;
      border-radius: 0 0 10px 10px;
      z-index: 5;
      -webkit-animation: forArm 1s infinite alternate;
      animation: forArm 1s infinite alternate;
    }

    .hand:before {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #feead6;
      top: 54px;
      left: 18px;
      -webkit-animation: pam 1s infinite alternate;
      animation: pam 1s infinite alternate;
    }

    .leg {
      width: 22px;
      background: #000;
      height: 50px;
      margin-left: 10px;
      margin-bottom: 45px;
      position: relative;
      -webkit-transform-origin: 100% 0%;
      transform-origin: 100% 0%;
      -webkit-animation: leg 1s infinite alternate;
      animation: leg 1s infinite alternate;
    }

    .leg .foot {
      position: absolute;
      top: 50px;
      left: 0;
      width: 22px;
      height: 50px;
      background: #000;
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
      -webkit-transform-origin: 100% 0%;
      transform-origin: 100% 0%;
      border-bottom: 6px solid #fff;
      border-radius: 0 0 2px 2px;
      -webkit-animation: foot 1s infinite alternate;
      animation: foot 1s infinite alternate;
    }

    .leg .foot:before {
      content: '';
      position: absolute;
      top: 50px;
      left: -1px;
      height: 13px;
      width: 42px;
      background: #000;
      border-radius: 0 10px 10px;
    }

    .leg.lft {
      position: absolute;
      bottom: -50px;
      animation-direction: alternate-reverse;
    }

    .leg.lft .foot {
      animation-direction: alternate-reverse;
    }

    @-webkit-keyframes spin {
      0% {
        left: 75px;
      }

      100% {
        left: -275px;
      }
    }

    @keyframes spin {
      0% {
        left: 75px;
      }

      100% {
        left: -275px;
      }
    }

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

      100% {
        -webkit-transform: rotate(20deg);
        transform: rotate(20deg);
      }
    }

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

      100% {
        -webkit-transform: rotate(20deg);
        transform: rotate(20deg);
      }
    }

    @-webkit-keyframes leg {
      0% {
        -webkit-transform: rotate(-10deg);
        transform: rotate(-10deg);
      }

      100% {
        -webkit-transform: rotate(10deg);
        transform: rotate(10deg);
      }
    }

    @keyframes leg {
      0% {
        -webkit-transform: rotate(-10deg);
        transform: rotate(-10deg);
      }

      100% {
        -webkit-transform: rotate(10deg);
        transform: rotate(10deg);
      }
    }

    @-webkit-keyframes ponytail {
      100% {
        -webkit-transform: rotate(10deg);
        transform: rotate(10deg);
      }
    }

    @keyframes ponytail {
      100% {
        -webkit-transform: rotate(10deg);
        transform: rotate(10deg);
      }
    }

    @-webkit-keyframes jacket {
      100% {
        -webkit-transform: rotate(20deg);
        transform: rotate(20deg);
      }
    }

    @keyframes jacket {
      100% {
        -webkit-transform: rotate(20deg);
        transform: rotate(20deg);
      }
    }

    @-webkit-keyframes forArm {
      100% {
        -webkit-transform: rotate(-30deg);
        transform: rotate(-30deg);
      }
    }

    @keyframes forArm {
      100% {
        -webkit-transform: rotate(-30deg);
        transform: rotate(-30deg);
      }
    }

    @-webkit-keyframes pam {
      0% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
      }

      100% {
        -webkit-transform: translate(-2px, 2px);
        transform: translate(-2px, 2px);
      }
    }

    @keyframes pam {
      0% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
      }

      100% {
        -webkit-transform: translate(-2px, 2px);
        transform: translate(-2px, 2px);
      }
    }
  </style>
</head>

<body>
  <div class="figure">
    <div class="mj">
      <div class="head">
        <div class="nose"></div>
        <div class="hair">
          <div class="ponytail"></div>
          <div class="frontpony"></div>
        </div>
      </div>
      <div class="body">
        <div class="jacket">
          <div class="hand"></div>
        </div>
      </div>
      <div class="leg">
        <div class="foot"></div>
      </div>
      <div class="leg lft">
        <div class="foot"></div>
      </div>
    </div>
    <div class="error-no"> <span>4</span>
      <div class="moon"></div><span>4</span>
    </div>
  </div>
</body>

</html>
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末泞遗,一起剝皮案震驚了整個(gè)濱河市求泰,隨后出現(xiàn)的幾起案子升薯,更是在濱河造成了極大的恐慌缀踪,老刑警劉巖,帶你破解...
    沈念sama閱讀 217,826評(píng)論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件臀栈,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)疗韵,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,968評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來侄非,“玉大人蕉汪,你說我怎么就攤上這事〕言梗” “怎么了肤无?”我有些...
    開封第一講書人閱讀 164,234評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長骇钦。 經(jīng)常有香客問我宛渐,道長,這世上最難降的妖魔是什么眯搭? 我笑而不...
    開封第一講書人閱讀 58,562評(píng)論 1 293
  • 正文 為了忘掉前任窥翩,我火速辦了婚禮,結(jié)果婚禮上鳞仙,老公的妹妹穿的比我還像新娘寇蚊。我一直安慰自己,他們只是感情好棍好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,611評(píng)論 6 392
  • 文/花漫 我一把揭開白布仗岸。 她就那樣靜靜地躺著,像睡著了一般借笙。 火紅的嫁衣襯著肌膚如雪扒怖。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,482評(píng)論 1 302
  • 那天业稼,我揣著相機(jī)與錄音盗痒,去河邊找鬼。 笑死低散,一個(gè)胖子當(dāng)著我的面吹牛俯邓,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播熔号,決...
    沈念sama閱讀 40,271評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼稽鞭,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了引镊?” 一聲冷哼從身側(cè)響起朦蕴,我...
    開封第一講書人閱讀 39,166評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤吃嘿,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后梦重,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體兑燥,經(jīng)...
    沈念sama閱讀 45,608評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,814評(píng)論 3 336
  • 正文 我和宋清朗相戀三年琴拧,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了降瞳。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,926評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡蚓胸,死狀恐怖挣饥,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情沛膳,我是刑警寧澤扔枫,帶...
    沈念sama閱讀 35,644評(píng)論 5 346
  • 正文 年R本政府宣布,位于F島的核電站锹安,受9級(jí)特大地震影響短荐,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜叹哭,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,249評(píng)論 3 329
  • 文/蒙蒙 一忍宋、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧风罩,春花似錦糠排、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,866評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至室琢,卻和暖如春乾闰,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背研乒。 一陣腳步聲響...
    開封第一講書人閱讀 32,991評(píng)論 1 269
  • 我被黑心中介騙來泰國打工汹忠, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留淋硝,地道東北人雹熬。 一個(gè)月前我還...
    沈念sama閱讀 48,063評(píng)論 3 370
  • 正文 我出身青樓,卻偏偏與公主長得像谣膳,于是被迫代替她去往敵國和親竿报。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,871評(píng)論 2 354