gsap实现一个钻石波纹波动动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现一个钻石波纹波动动画效果代码

代码标签: 钻石 波纹 波动 动画 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
body {
 background-color: #1c1c1c;
 overflow: hidden;
 text-align:center;
  display: flex;
  align-items: center;
  justify-content: center; 
}

body,
html {
 height: 100%;
 width: 100%;
 margin: 0;
 padding: 0;
}

svg {
 width: 100%;
 height: 100%;
 visibility: hidden;
 
}
</style>


</head>

<body >
  <svg id="mainSVG" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
    <linearGradient id="grad1" x1="393.05" y1="391.01" x2="393.05" y2="247.71" gradientUnits="userSpaceOnUse">
      <stop offset="0" stop-color="#c68af8"/>
      <stop offset="1" stop-color="#58d1dc"/>
    </linearGradient>	

   <linearGradient id="grad2" x1="393.05" y1="391.01" x2="393.05" y2="247.71" gradientUnits="userSpaceOnUse">
      <stop offset="0" stop-color="#EA4F2C"/>
      <stop offset="1" stop-color="#FAAC25"/>
    </linearGradient>	

   <linearGradient id="grad3" x1="393.05" y1="551.01" x2="393.05" y2="347.71" gradientUnits="userSpaceOnUse">
      <stop offset="0" stop-color="#D93964"/>
      <stop offset="1" stop-color="#8D2AE6"/>
    </linearGradient>	

   <linearGradient id="grad4" x1="393.05" y1="400" x2="393.05" y2="200" gradientUnits="userSpaceOnUse">
      <stop offset="0" stop-color="#6A2CB6"/>
      <stop offset="1" stop-color="#5AD4FD"/>
    </linearGradient>	
<g stroke="#FFFCF9">
	    <g id="bg" fill="none"  stroke-linecap="round" stroke-miterlimit="10">
        <path d="M594.5,250v-.29L594.6,350" />
        <line x1="580.5" y1="390" x2="580.32" y2="210" />
        <line x1="565.5" y1="415" x2="565.28" y2="185" />
        <line x1="550.5" y1="434" x2="550.24" y2="166" />
        <line x1="535.5" y1="449" x2="535.22" y2="151" />
        <line x1="520.5" y1="462" x2="520.2" y2="138" />
        <line x1="505.5" y1="472" x2="505.18" y2="128" />
        <line x1="490.5" y1="480" x2="490.16" y2="120" />
        <line x1="475.5" y1="487" x2="475.14" y2="113" />
        <line x1="460.5" y1="492" x2="460.14" y2="108" />
        <line x1="445.5" y1="496" x2="445.12" y2="104" />
        <line x1="430.5" y1="499" x2="430.12" y2="101" />
        <line x1="415.5" y1="501" x2="415.12" y2="99" />
        <line x1="400.5" y1="501" x2="400.12" y2="99" />
        <line x1="385.5" y1="501" x2="385.12" y2="99" />
        <line x1="370.5" y1="499" x2="370.12" y2="101" />
        <line x1="355.5" y1="496" x2="355.12" y2="104" />
        <line x1="340.5" y1="492" x2="340.14" y2="108" />
        <line x1="325.5" y1="487" x2="325.14" y2="113" />
        <line x1="310.5" y1="480" x2="310.16" y2="120" />
        <line x1="295.5" y1="472" x2="295.18" y2="128" />
        <line x1="280.5" y1="462" x2="280.2" y2="138" />
        <line x1="265.5" y1="449" x2="265.22" y2="151" />
        <line x1="250.5" y1="434" x2="250.24" y2="166" />
        <line x1="235.5" y1="415" x2="235.28" y2="185" />
        <line x1="220.5" y1="390" x2="220.32" y2="210" />
        <polyline points="204.5 250 204.5 350.29 204.5 350" />
    </g>

    <g id="fat" fill="none"  stroke-linecap="round" stroke-miterlimit="10" stroke-width="6">
                    <path d="M594.6,350l-.1-100.29V250" />
                <line x1="580.5" y1="390" x2="580.32" y2="210" />
                <line x1="565.5" y1="415" x2="565.28" y2="185" />
                <line x1="550.5" y1="434" x2="550.24" y2="166" />
                <line x1="535.5" y1="449" x2="535.22" y2="151" />
                <line x1="520.5" y1="462" x2="520.2" y2="138" />
                <line x1="505.5" y1="472" x2="505.18" y2="128" />
                <line x1="490.5" y1="480" x2="490.16" y2="120" />
                <line x1="475.5" y1="487" x2="475.14" y2="113" />
                <line x1="460.5" y1="492" x2="460.14" y2="108" />
                <line x1="445.5" y1="496" x2="445.12" y2="104" />
                <line x1="430.5" y1="499" x2="430.12" y2="101" />
                <line x1="415.5" y1="501&quo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0