gsap+svg实现鲜花生长动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap+svg实现鲜花生长动画效果代码,另外还使用了GSDevTools3与DrawSVGPlugin3插件。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #35ba9f; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; } svg { height: 100vh; } </style> </head> <body> <svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" xmlns:bx="https://boxy-svg.com"> <defs> <radialGradient gradientUnits="userSpaceOnUse" cx="200" cy="121" r="200" id="gradient-2" gradientTransform="matrix(1, 0, 0, 1, 0.57454274, 0.47587659)"> <stop offset="0" style="stop-color: rgb(122, 230, 208);"></stop> <stop offset="1" style="stop-color: rgb(53, 186, 159);"></stop> </radialGradient> <radialGradient gradientUnits="userSpaceOnUse" cx="208.161" cy="106.496" r="27.05" id="gradient-0" gradientTransform="matrix(0.462108, 0, 0, 0.462108, 112.608571, 57.530171)"> <stop offset="0" style="stop-color: rgb(247, 255, 0);"></stop> <stop offset="1" style="stop-color: rgb(255, 200, 0);"></stop> </radialGradient> <filter id="drop-shadow-filter-0" color-interpolation-filters="sRGB" x="-50%" y="-50%" width="200%" height="200%" bx:preset="drop-shadow 1 1.5 1.5 0 0.5 rgba(108,108,108,1)"> <feGaussianBlur in="SourceAlpha" stdDeviation="0"></feGaussianBlur> <feOffset dx="1.5" dy="1.5"></feOffset> <feComponentTransfer result="offsetblur"> <feFuncA id="spread-ctrl" type="linear" slope="1"></feFuncA> </feComponentTransfer> <feFlood flood-color="rgba(108,108,108,1)"></feFlood> <feComposite in2="offsetblur" operator="in"></feComposite> <feMerge> <feMergeNode></feMergeNode> <feMergeNode in="SourceGraphic"></feMergeNode> </feMerge> </filter> <filter id="drop-shadow-filter-1" color-interpolation-filters="sRGB" x="-50%" y="-50%" width="200%" height="200%" bx:preset="drop-shadow 1 1 1 0 0.5 rgba(0,0,0,0.3)"> <feGaussianBlur in="SourceAlpha" stdDeviation="0"></feGaussianBlur> <feOffset dx="1" dy="1"></feOffset> <feComponentTransfer result="offsetblur"> <feFuncA id="spread-ctrl" type="linear" slope="1"></feFuncA> </feComponentTransfer> <feFlood flood-color="rgba(0,0,0,0.3)"></feFlood> <feComposite in2="offsetblur" operator="in"></feComposite> <feMerge> <feMergeNode></feMergeNode> <feMergeNode in="SourceGraphic"></feMergeNode> </feMerge> </filter> </defs> <rect width="400" height="400" style="fill: url(#gradient-2); pointer-events: none;"></rect> <g transform="matrix(0.862637, -0.11551, 0.11977, 0.89445, -0.471743, 3.96244)" style="" class="leaf1"> <path d="M 200.219 346.941 C 209.556 355.107 203.663 367.212 195.793 371.741 C 187.923 376.27 177.147 372.51 171.721 363.341 C 166.296 354.173 155.369 327.671 157.669 307.275 C 160.529 321.26 190.883 338.775 200.219 346.941 Z" style="fill: rgb(15, 91, 28); transform-origin: 176.447px 330.87px;"></path> </g> <g class="leaf2"> <path d="M 202.553 359.753 C 190.009 365.337 196.202 372.617 205.639 375.051 C 215.073 377.488 228.987 374.586 236.719 368.572 C 244.448 362.559 260.821 345.415 259.969 332.767 C 254.979 341.666 215.097 354.168 202.553 359.753 Z" style=&qu.........完整代码请登录后点击上方下载按钮下载查看
网友评论0