css实现四款语音通话中人物头像背景波纹扩散动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现四款语音通话中人物头像背景波纹扩散动画效果代码

代码标签: css 语音通话 人物 头像 背景 波纹 扩散 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  <meta name="viewport" content="width=device-width, initial-scale=1">

  
  
<style>
html, body{
  height: 100%;
  width: 100%;
}

body{
  align-items: center;
  background: #5FD068;
  display: flex;
  justify-content: center;
}

#visuals{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

@media (orientation: landscape) {
  #visuals{
    height: 90vh;
    width: 90vh;
  }
}

@media (orientation: portrait) {
  #visuals{
    height: 90vw;
    width: 90vw;
  }
}
</style>




</head>

<body  >
  <div id="visuals">
  <div class="visual">
    <!-- Ripple -->
    <svg viewBox="0 0 320 320">
      <defs>
        <circle id="circle-clip" cx="50%" cy="50%" r="25%" />
        <clipPath id="avatar-clip">
          <use href="#circle-clip" />
        </clipPath>
      </defs>

      <circle cx="50%" cy="50%" r="25%" fill="white" fill-opacity="1">
        <animate attributeName="r" values="25%;50%" dur="4s" repeatCount="indefinite" />
        <animate attributeName="fill-opacity" values="1;0" dur="4s" repeatCount="indefinite" />
      </circle>

      <circle cx="50%" cy="50%" r="25%" fill="white" fill-opacity="1">
        <animate attributeName="r" values="25%;50%" dur="4s" begin="1s" repeatCount="indefinite" />
        <animate attributeName="fill-opacity" values="1;0" dur="4s" begin="1s" repeatCount="indefinite" />
      </circle>

      <circle cx="50%" cy="50%" r="25%" fill="white" fill-opacity="1">
        <animate attributeName="r" values="25%;50%" dur="4s" begin="2s" repeatCount="indefinite" />
        <animate attributeName="fill-opacity" values="1;0" dur="4s" begin="2s" repeatCount="indefinite" />
      </circle>

      <circle cx="50%" cy="50%" r="25%" fill="white" fill-opacity="1">
        <animate attributeName="r" values="25%;50%" dur="4s" begin="3s" repeatCount="indefinite" />
        <animate attributeName="fill-opacity" values="1;0" dur="4s" begin="3s" repeatCount="indefinite" />
      </circle>

      <image height="50%" width="50%" x="25%" y="25%" href="//repo.bfw.wiki/bfwrepo/image/60d41f5173b0d.png" clip-path="url(#avatar-clip)" />  
    </svg>
  </div>
  
  <div class="visual">
    <!-- Bloom -->
    <svg viewBox="0 0 320 320">
  <defs>
    <circle id="circle-clip" cx="50%" cy="50%" r="25%" />
    <clipPath id="avatar-clip">
      <use href="#circle-clip" />
    </clipPath>
  </defs>
  
  <circle cx="50%" cy="50%" r="25%" fill="white" fill-opacity="0.5" transform-origin="50% 50%">
    <animate attributeName="cx" values="50%;45%;40%;50%;45%;50%;40%;50%" dur="5s" repeatCount="indefinite" />
    <animate attributeName="cy" values="50%;45%;40%;50%;45%;50%;40%;50%" dur="5s" repeatCount="indefinite" />
  </circle>
  
  <circle cx="50%" cy="50%" r="25%" fill="white" fill-opacity="0.5" transform-origin="50% 50%&qu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0