其他分享
首页 > 其他分享> > css实现水波纹动效

css实现水波纹动效

作者:互联网

效果如下:

 

 

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    #box{
      width: 200px;
      height: 200px;
      background-color: #68CCCA;
      opacity: 0.5;
      display: flex;
      justify-content:center;
      align-items: center;
    }
    .radius{
      width: 50px;
      height: 50px;
      background-color:#F44E3B;
      border-radius: 50%;
      position:relative;
      display: flex;
      justify-content:center;
      align-items: center;
      overflow: hidden;
    }
    .juxin{
      width: 100px;
      height:100px;
      background-color: blanchedalmond;
      border-radius: 30%;
      position: absolute;
      top: -70px;
      /* left: 50%;
      transform:translateX(-50%); */
      animation:identifier 4s linear infinite;
    }
    @keyframes identifier {
      0%{top: -70px; transform:rotate(0deg);}
            50%{ top: -90px;transform:rotate(180deg);}
            100%{ top: -115px;transform:rotate(360deg);}
    }
  </style>
</head>
<body>
  <div id="box">
    <div class="radius">
      <div class="juxin"></div>
    </div>
  </div>
</body>
</html>

 

标签:水波纹,center,color,top,50%,transform,动效,radius,css
来源: https://www.cnblogs.com/lijingru/p/16095597.html