gsap+svg实现圣诞小头跳跃动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap+svg实现圣诞小头跳跃动画效果代码

代码标签: gsap svg 圣诞 跳跃 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">





    <style>
        @import url("https://fonts.googleapis.com/css?family=Kanit:900");
        body {
          display: flex;
          align-items: center;
          justify-content: center;
          flex-direction: column;
          min-height: 100vh;
          background-color: #C94C4C;
        }
        
        #BodyLighter {
          position: absolute;
          top: -50px;
        }
        
        .svg-container {
          display: inline-block;
          position: relative;
          width: 25em;
          padding-bottom: 25em;
          vertical-align: middle;
        }
        
        .st0 {
          fill: #5296A5;
        }
        
        .st1 {
          fill: #71acb9;
        }
        
        .st2 {
          fill: #ffffff;
        }
        
        .st3 {
          fill: #1f3454;
        }
        
        .st4 {
          fill: #9E3030;
        }
        
        h1 {
          font-family: "Kanit";
          font-size: 4rem;
          position: absolute;
          margin-top: 150px;
          text-align: center;
          width: 100%;
          color: #fff;
          font-weight: 700;
          text-shadow: 0 1px 0 #b53737, 0 2px 0 #ae3434, 0 3px 0 #a63232, 0 4px 0 #9e3030, 0 5px 0 #962d2d, 0 6px 0 #8e2b2b, 0 7px 0 #862929, 0 8px 0 #7f2626, 0 0 5px rgba(196, 30, 30, 0.05), 0 -1px 3px rgba(196, 30, 30, 0.2), 0 9px 9px rgba(196, 30, 30, 0.3), 0 12px 12px rgba(196, 30, 30, 0.3), 0 15px 15px rgba(196, 30, 30, 0.3);
        }
        
        #days {
          color: #b1cbbb;
        }
    </style>


</head>

<body>
    <div class="svg-container">
        <svg version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 237.05 322.44" preserveAspectRatio="xMinYMin meet">
    <g id="AllBodyGroup">
      <g id="Body">
        <circle id="BodyBase" class="st0" cx="140" cy="102.98" r="64.33" />
        <circle id="BodyLight" class="st1" cx="133.1" cy="104.16" r="46.67" />
      </g>
      <g id="LeftEye">
        <circle id="EyeBaseRight_00000138570641561815964600000007664720743631060924_" class="st2" cx="157.71" cy="92.59" r="17.71" />
        <circle id="PupilRight_00000002366735156703226120000008972240633418662560_" class="st3" cx="162.38" cy="89.35" r="11.05" />
        <circle id="BigEyeShineLeft" class="st2" cx="166.47" cy="83.17" r="4.08" />
        <circle id="SmallEyeShineLeft" class="st2" cx="162.78" cy="89.87" r="1.61" />
      </g>
      <g id="RightEye">
        <circle id="EyeBaseRight" class="st2" cx="186.59" cy="82.99" r="12.4" />
        <circle id="PupilRight" class="st3" cx="190.08" cy="80.49" r="7.42" /&.........完整代码请登录后点击上方下载按钮下载查看

网友评论0