gsap实现邮件按钮点击发送动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现邮件按钮点击发送动画效果代码

代码标签: 按钮 点击 发送 动画 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap");
body {
	margin: 0;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: "Roboto", sans-serif;
	font-weight: bold;
	background-color: #291d89;
}

svg {
	width: 100%;
	height: 100vh;
}

.hidden {
	visibility: hidden;
}

#base {
	cursor: pointer;
}
</style>



</head>

<body >
  <svg viewBox="0 0 1400 1080" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path id="paperPlaneRoute" d="M563.558,526.618 C638.854,410.19 787.84,243.065 916.53,334.949 1041.712,424.328 858.791,877.927 743.926,856.655 642.241,838.669 699.637,688.664 700,540" stroke="white"  stroke-width="3" style="stroke-dashoffset: 0.001px; stroke-dasharray: 0px, 999999px;"/>
  <g id="rectSent" clip-path="url(#clipPath)">
    <g id="rectSentItems">
      <rect id="sentBase" x="460" y="468.5" width="480" height="143" rx="23" fill="white"/>
      <text id="txtSent" fill="#4F67ED" xml:space="preserve" style="white-space: pre" font-family="Roboto" font-size="82" font-weight="bold" letter-spacing="0.025em"><tspan x="637.487" y="568.027">Sent!</tspan></text>
    </g>
  </g>
  <g id="base">
    <g filter="url(#flShadow)"><rect id="btnBase" x="418.117" y="460.55" width="563.765" height="158.899" rx="27" fill="#F1F3FF" /></g>
      <text id="txtSend" fill="#291D89" xml:space="preserve" style="white-space: pre" font-family="Roboto" font-size="82" font-weight="bold" letter-spacing="0.06em"><tspan x="679.379" y="568.027">Send</tspan></text>
      <g id="paperPlane" style="transform-origin: 0px 0px 0px;" data-svg-origin="563.55859375 527.734375" transform="matrix(0.8396,0.5432,-0.5432,0.8396,377.09924,-222.6639)">
      <path id="paperPlanePath" d="M560.611 481.384C562.003 479.263 565.113 479.263 566.505 481.384L607.063 543.177C615.657 556.272 607.507 573.375 592.766 575.676L566.422 557.462V510.018C566.422 508.436 565.14 507.154 563.558 507.154C561.976 507.154 560.693 508.436 560.693 510.018V557.462L534.349 575.676C519.609 573.375 511.459 556.272 520.053 543.177L560.611 481.384Z" fill="#4F67EB"/>
    </g>
  </g>
  <circle id="cBottom" cx="700" cy="540" r="97.516" fill="#C23F3F"  class="hidden"/>
  <circle id="cTop" cx="700" cy="502.365" r="107.898" fill="#C23F3F" class="hidden"/>
  <circle id="cCenter" cx="700" cy="540" r="123" fill="#A74C4C" class="hidden" />
  <circle id="cEnd" cx="495" cy="540" r="98" fill="#F1F3FF" class="hidden"/>
  <path id="tickMark" fill-rule="evenodd" clip-rule="evenodd" d="M597.3 489.026C595.179 487.257 592.026 487.541 590.257 489.662L550.954 536.768L534.647 522.965C532.539 521.181 529.384 521.444 527.6 523.551L519.096 533.598C517.312 535.706 517.575 538.861 519.682 540.645L538.606 556.662C538.893 557.162 539.272 557.621 539.74 558.012L549.847 566.445C551.967 568.214 555.12 567.929 556.889 565.809L608.042 504.501C609.811 502.38 609.527 499.227 607.406 497.458L597.3 489.026Z" fill="#4E67E8" class="hidden"/>
  <defs>
    <clipPath id="clipPath">
      <rect id="mask1" x="700" y="450" width="520" height="180" fill="white" id="clipRect"/>
    </clipPath>
    <filter id="flShado.........完整代码请登录后点击上方下载按钮下载查看

网友评论0