gsap实现路径运动动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现路径运动动画效果代码

代码标签: 运动 动画 效果

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

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

<head>

  <meta charset="UTF-8">

  
  
<style>
body {
  background-color: #16181D;
  background-image: linear-gradient(205deg, #313346 0%, #15161D 76%);
  height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

svg {
  position: absolute;
}
</style>


</head>

<body>
  <div class="container">
<svg viewBox="0 0 1146 689" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd">
  <path id="ant" d="M568.915 167.284l-43.06-137.99m62.307 137.664l43.061-137.99" fill="none" fill-rule="nonzero" stroke="#4d4ada" stroke-width="3.26"/>
  <path id="TV" d="M382.487 160.107c-6.882 0-12.581 5.345-13.022 12.213l-18.587 289.484c-.468 7.3 5.154 13.559 12.462 13.873l51.601 2.218 15.659 96.507h317.082l13.502-81.624 35.641 1.532" fill="#fcaacf"/>
  <path id="base" d="M430.6 573.749l-15.985-98.517c137.241 17.82 213.091 18.539 347.42 11.743l-14.353 86.774H430.6z" fill-opacity=".19" fill-rule="nonzero"/>
  <path id="screen" d="M407.764 214.911c20.552-37.841 309.83-47.555 336.656-26.75 114.828 89.057 68.883 215.977 22.835 256.629-37.15 32.796-336.125 16.964-375.24-17.512-39.114-34.476.724-184.702 15.749-212.367z" fill="#2249b3" fill-rule="nonzero"/>
  <path id="heads" d="M522.48 274.855c-54.11-42.11-76.611-2.602-81.104 22.717-4.493 25.319 2.408 42.155 6.774 64.826 2.26 11.737.531 19.495-2.871 30.954l-3.903 13.147s-5.883 14.907-9.145 19.474c-3.262 4.567-3.263 16.311-3.263 16.311 40.761 9.248 54.019 9.576 93.512 14.68 1.018-7.438-11.232-28.726-24.458-50.465 0-13.892-1.033-7.226 0-32.085 0 0 24.458 3.267 24.458-7.583 0-6.174 4.714-26.857 4.714-26.857s8.321 1.531 6.637-2.006c-1.544-3.242-3.55-8.644-3.55-8.644s-.463-4.476-2.178-8.44c-1.604-3.707.496-15.781 0-19.79-2.845-22.998-5.623-26.239-5.623-26.239zm98.789 4.872c54.11-42.109 76.611-2.602 81.104 22.717 4.493 25.319-2.409 42.156-6.775 64.827-2.26 11.737-.531 19.495 2.871 30.953l3.904 13.147s5.883 14.908 9.145 19.475c3.262 4.567 3.868 27.749 3.868 27.749-41.429 5.872-83.511 3.915-94.602 3.915-1.018-7.438 11.716-29.4 24.942-51.139 0-13.891 1.033-7.226 0-32.085 0 0-24.457 3.267-24.457-7.583 0-6.174-4.715-26.856-4.715-26.856s-8.321 1.531-6.637-2.007c1.544-3.241 3.55-8.643 3.55-8.643s.464-4.477 2.178-8.441c1.604-3.707-.495-15.781 0-19.789 2.845-22.998 5.624-26.24 5.624-26.24z" fill="#fff" fill-rule="nonzero"/>
  <path id="hair" d="M632.874 289.039c-15.435-8.026-18.936-9.4-14.46-19.072 7.1-24.696 56.542-14.867 59.734-13.274 24.745 12.347 16.708 22.594 26.548 39.359 10.007 17.051 5.044 4.718 5.044 24.938 0 20.219 21.195 21.83 32.926 35.721 11.73 13.891 10.24 22.167 10.187 42.731-.034 12.789-19.56 5.027-20.177 28.488-.494 18.769-29.117 1.294-42.082-9.46-12.713-10.545-13.175-38.303-17.126-38.673-4.94-.463-12.916-15.523-11.373-32.656 1.544-17.132 3.346-25.071-11.008-30.936-14.354-5.865 1.08-17.133-18.213-27.166z" fill="#222f9e" fill-rule="nonzero"/>
  <clipPath id="_clip1">
    <path id="hair1" d="M632.874 289.039c-15.435-8.026-18.936-9.4-14.46-19.072 7.1-24.696 56.542-14.867 59.734-13.274 24..........完整代码请登录后点击上方下载按钮下载查看

网友评论0