gsap+svg实现彩带流动堆叠动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap+svg实现彩带流动堆叠动画效果代码,结合了ScrubGSAPTimeline、DrawSVGPlugin3与CustomEase3。

代码标签: gsap svg 彩带 流动 堆叠 动画

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
 background-color: #FFFCF9;
 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" preserveAspectRatio="xMinYMid slice">
    <g id="ribbon">
      <path d="M130,302.94h65c50,0,50-17.91,100-17.91s50,17.91,100,17.91h65" fill="none" stroke="#4390d1" stroke-miterlimit="10" stroke-width="6"/>
      <path d="M130,296.94h65c50,0,51.75,18.16,101.75,18.16s48.25-18.16,98.25-18.16h65" fill="none" stroke="#ec93d1" stroke-miterlimit="10" stroke-width="6"/>
      <path d="M130,308.94h65c50,0,53.41-12,103.41-12s46.59,12,96.59,12h65" fill="none" stroke="#f4e073" stroke-miterlimit="10" stroke-width="6"/>
      <path d="M130,315.1h65c50,0,50-45.9,100-45.9s50,45.9,100,45.9h65" fill="none" stroke="#47b081" stroke-miterlimit="10" stroke-width="6"/>
      <path d="M130,291.03h65c50,0,50.82,11.91,100.82,11.91s49.18-11.91,99.18-11.91h65" fill="none" stroke="#877788" stroke-miterlimit="10" stroke-width="6"/>
      <path d="M130,285.03h65c50,0,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0