svg filter实现波动的水面倒影动画效果代码

代码语言:html

所属分类:动画

代码描述:svg filter实现波动的水面倒影动画效果代码

代码标签: svg filter 波动 水面 倒影 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">





    <style>
        img {
          width: 100%;
          max-width: 100%;
          min-width: 200px;
        }
        
        .app {
          width: 100vw;
          display: grid;
          height: 100vh;
          place-items: center;
        }
        
        h1 {
          font-size: 6rem;
          margin: 0;
          padding: 0;
          line-height: 1;
        }
        
        .reflection {
          position: relative;
          width: 200px;
          aspect-ratio: 200/305;
          display: inline-flex;
          flex-direction: column;
        }
        .reflection > * {
          position: absolute;
          z-index: 1;
          top: 0;
          left: 0;
        }
        
        .clone {
          filter: url(#wavy);
          transform: rotate(180deg) scaleX(-1) scaley(0.25) translateY(6%) translateX(-4%);
          opacity: 0.8;
          z-index: 0;
          transform-origin: left bottom;
        }
        .clone::after {
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          width: 100%.........完整代码请登录后点击上方下载按钮下载查看

网友评论0