zoukankan      html  css  js  c++  java
  • 实现动画效果

    <!DOCTYPE html> 

    <html lang="en"> 

      

    <head> 

      <meta charset="UTF-8"> 

      <meta name="viewport" content= 

        "width=device-width, initial-scale=1.0">       

      <title>Animated loader</title> 

      

      <style> 

        body { 

          display: flex; 

          justify-content: center; 

          align-items: center; 

          min-height: 100vh; 

          background: #202020; 

      

        } 

      

        .pieces { 

          padding: 10px; 

          border-radius: 50%; 

          background: #ffcc00; 

          position: absolute; 

          right: 40%; 

          animation: pieces 1s linear infinite; 

        } 

      

        .one { 

          position: absolute; 

          top: 50.5%; 

          left: 30%; 

          background: yellowgreen; 

          border-radius: 0 0 125px 125px; 

          height: 125px; 

          250px; 

          animation: anim1 1s linear infinite; 

        } 

      

        .two { 

          position: absolute; 

          top: 36.5%; 

          left: 30%; 

          background: yellowgreen; 

          border-radius: 125px 125px 0 0; 

          height: 125px; 

          250px; 

          animation: anim2 1s linear infinite; 

        } 

      

        .eye { 

          position: absolute; 

          right: 60%; 

          top: 40%; 

          background: #202020; 

          padding: 12px; 

          border-radius: 50%; 

          animation: eye 1s linear infinite; 

        } 

      

        p { 

          position: absolute; 

          font-weight: bold; 

          text-transform: uppercase; 

          font-size: 25px; 

          letter-spacing: 2px; 

          top: 53%; 

          right: 30%; 

          font-family: arial; 

          color: green; 

        } 

      

        @keyframes anim1 { 

          0% { 

            transform: rotate(0deg); 

          } 

      

          50% { 

            transform: rotate(20deg); 

          } 

      

          100% { 

            transform: rotate(0deg); 

          } 

        } 

      

        @keyframes anim2 { 

          0% { 

            transform: rotate(0deg); 

          } 

      

          50% { 

            transform: rotate(-20deg); 

          } 

      

          100% { 

            transform: rotate(0deg); 

          } 

        } 

      

        @keyframes eye { 

          0% { 

            top: 40%; 

            right: 60%; 

          } 

      

          50% { 

            top: 40.3%; 

            right: 60.3%; 

          } 

      

          100% { 

            top: 40%; 

            right: 60%; 

          } 

        } 

      

        @keyframes pieces { 

          0% { 

            right: 40%; 

          } 

      

          100% { 

            right: 60%; 

          } 

        } 

    </style> 

    </head> 

      

    <body> 

      <div class="pieces"></div> 

      <div lass="one"></div> 

      <div class="two"></div> 

      <div class="eye"></div> 

      

      <p>GeeksforGeeks loading...</p> 

    </body> 

      

    </html> 

  • 相关阅读:
    删数问题
    八中公司_二分图带权最大匹配模板题
    完美子图(这道题太难了,得写下来要不回头又忘了)
    最近集训的图论(思路+实现)题目汇总(内容包含tarjan、分层图、拓扑、差分、奇怪的最短路):
    方格取数(简单版)+小烈送菜(不知道哪来的题)-----------奇怪的dp增加了!
    单调队列优化题:最大数(P1198)
    单调队列+线性dp题Watching Fireworks is Fun (CF372C)
    关于看了几道洛谷灰题(暂无评定)的感想
    洛谷的奇妙今日运势
    互不侵犯(洛谷P1896)
  • 原文地址:https://www.cnblogs.com/weixin2623670713/p/13642583.html
Copyright © 2011-2022 走看看