自学内容网 自学内容网

前端动画案例分享

 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    .blinking-squares {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .square {
      width: 15px;
      height: 15px;
      margin: 0 5px;
      background-color: #ff6b6b;
      animation: blink 1.5s infinite ease-in-out;
    }

    .square:nth-child(2) {
      animation-delay: 0.2s;
    }

    .square:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.3; }
    }
  </style>
</head>
<body>
  <div class="blinking-squares">
    <div class="square"></div>
    <div class="square"></div>
    <div class="square"></div>
  </div>
</body>
</html>

 

 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    .ring-pulse-loader {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .ring-pulse {
      width: 60px;
      height: 60px;
      border: 5px solid #ff6b6b;
      border-radius: 50%;
      animation: pulseRing 2s infinite ease-in-out;
    }

    @keyframes pulseRing {
      0%, 100% {
        transform: scale(0.7);
        opacity: 1;
      }
      50% {
        transform: scale(1);
        opacity: 0.5;
      }
    }
  </style>
</head>
<body>
  <div class="ring-pulse-loader">
    <div class="ring-pulse"></div>
  </div>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    .circle-loader {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .circle {
      width: 15px;
      height: 15px;
      margin: 0 5px;
      background-color: #ff6b6b;
      border-radius: 50%;
      animation: bounce 1.5s infinite;
    }

    .circle:nth-child(2) {
      animation-delay: 0.3s;
    }

    .circle:nth-child(3) {
      animation-delay: 0.6s;
    }

    @keyframes bounce {
      0%, 100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-15px);
      }
    }
  </style>
</head>
<body>
  <div class="circle-loader">
    <div class="circle"></div>
    <div class="circle"></div>
    <div class="circle"></div>
  </div>
</body>
</html>

想要获取更多特效,点击免费使用小奈AI 


原文地址:https://blog.csdn.net/m0_55472195/article/details/142590404

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!