前端动画案例分享

 

<!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 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值