CSS实现图标周围扩散闪烁效果

4 篇文章 0 订阅

.直接上效果

 

1.html内容

<div class="outDiv">
        <img src="../img/xinhao.png" />
        <div class="blingbling"></div>
        <div class="blingbling2"></div>
      </div>

2.样式内容

.outDiv{
  width:430px;
  height:430px;
  display: flex;
  justify-content: center;
  align-items: center;
	margin-left:200px;
	margin-top:200px;
  
}

.blingbling{
    border: 36px solid #73BF00;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: absolute;
    -webkit-animation: scaleout 2.5s infinite ease-in-out;
    animation: scaleout 2.5s infinite ease-in-out;
  }
.blingbling2{
    border: 36px solid #70B400;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    position: absolute;
    -webkit-animation: scaleout 2.5s infinite ease-in-out;
    animation: scaleout 2.5s infinite ease-in-out;
  }
  @-webkit-keyframes scaleout {
    0% { -webkit-transform: scale(1.0) }
    100% {
      -webkit-transform: scale(1.1);
      opacity: 0;
    }
  }
  @keyframes scaleout {
    0% {
      transform: scale(1.0);
      -webkit-transform: scale(1.0);
    } 
	  100% {
        transform: scale(1.1);
        -webkit-transform: scale(1.1);
        opacity: 0;
      }
  }

其中1.3s是闪烁的频率,宽高自己调整,祝你开发愉快~

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值