呼吸灯效果css

在这里插入图片描述

<div class="fatherBreathIcon">
                          <div class="sonBreathIcon" style="background: rgba(188, 36, 36, 1); width: 10px; height: 10px; animation-delay: 0s;"></div>
                          <div class="sonBreathIcon" style="background: rgba(188, 36, 36, 0.8); width: 25px; height: 25px; animation-delay: 0.4s;"></div>
                          <div class="sonBreathIcon" style="background: rgba(188, 36, 36, 0.6); width: 40px; height: 40px; animation-delay: 0.8s;"></div>
                          <div class="sonBreathIcon" style="background: rgba(188, 36, 36, 0.4); width: 55px; height: 55px; animation-delay: 1.2s;"></div>
                          <div class="sonBreathIcon" style="background: rgba(188, 36, 36, 0.2); width: 70px; height: 70px; animation-delay: 1.6s;"></div>
            </div>

.fatherBreathIcon {
  width: 80px;
  height: 80px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 40%) rotateX(60deg);
}
.sonBreathIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  animation-name: iconBreathLight;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-duration: 2s;
  -webkit-user-drag: none;
  filter: none;
  opacity: 0;
}
@keyframes iconBreathLight {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  20% {
    opacity: 0.4;
  }
  30% {
    opacity: 0.6;
  }
  40% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  60% {
    opacity: 0.8;
  }
  70% {
    opacity: 0.6;
  }
  80% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
  }
}
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值