Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">
  <svg class="monkey" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg65" width="516" height="500" viewBox="0 0 516 1310">
  <g id="g73" stroke-linecap="butt" stroke-linejoin="miter" stroke-opacity="1">
    <path d="m 128.74789,83.122676 c 0,0 -17.49619,47.716874 -20.67731,87.480924 -3.18113,39.76406 3.18112,139.96948 9.54337,160.64679 6.36225,20.67731 23.85844,74.75643 27.03956,95.43374 3.18113,20.67731 0,127.24498 0,135.1978 0,7.95281 -7.15753,8.74809 -7.15753,8.74809 l 9.54338,3.9764 4.77168,6.36225 -0.79528,6.36226 -4.77169,9.54337 -11.13393,2.38584 1.59056,11.92922 c 0,0 3.97641,5.19758 11.92922,5.19758 7.95281,0 13.51978,-9.17398 13.51978,-9.17398 l 4.4023,-28.76657 -2.81174,-34.06065 4.77169,-26.24427 v -71.57531 c 0,0 0,-46.92159 -7.15753,-70.78003 -7.15754,-23.85843 -23.06315,-43.74046 -27.83484,-73.16586 -4.77169,-29.4254 -0.79528,-91.45733 -0.79528,-91.45733 0,0 -2.38585,-45.33103 2.38584,-62.82721 4.77168,-17.49618 14.31506,-63.622491 14.31506,-63.622491 z" id="trunk-up" fill="green" stroke="#000" stroke-width="0" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 145.44879,658.11094 c 0,0 3.18113,57.26025 3.97641,66.00834 0.79528,8.74809 -8.74809,56.46497 -8.74809,56.46497 l 2.38584,27.03955 12.7245,3.18113 3.18112,-39.76406 c 0,0 6.36225,-34.19709 11.13394,-48.51215 4.77168,-14.31506 7.95281,-45.33102 5.56696,-58.85081 -2.38583,-13.51978 -4.77168,-21.47258 -4.77168,-21.47258 l -16.70091,13.51977 z" id="trunk-middle" opacity=".98" fill="green" stroke="#000" stroke-width="0" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 144.32409,874.13797 13.8492,70.27423 c 0,0 -3.97641,37.37821 -9.54337,53.28378 -5.56697,15.90572 -11.92922,36.58302 -8.7481,57.26032 3.18113,20.6773 23.85844,62.0318 23.85844,62.0318 0,0 0.79528,29.4254 -1.59056,36.583 -2.38585,7.1575 2.38584,15.9056 2.38584,15.9056 0,0 18.29147,-36.5829 11.13393,-54.0791 -7.15752,-17.4962 -26.24427,-63.6225 -26.24427,-63.6225 0,0 -3.18113,-25.4489 6.36225,-44.5357 9.54337,-19.08678 25.44899,-77.14229 16.7009,-89.8668 -8.74809,-12.72451 -5.56697,-35.78765 -5.56697,-35.78765 z" id="trunk-bottom" fill="green" stroke="#000" stroke-width="0" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 226.56747,477.58213 c 0,0 -20.67731,-0.79529 -20.67731,11.13393 0,11.92922 3.9764,30.22068 14.31506,28.63012 10.33865,-1.59056 -6.36225,-2.38584 -6.36225,8.74809 0,11.13394 11.13394,22.26788 16.7009,23.85844 5.56697,1.59056 31.01597,10.33865 47.71688,8.74809 16.7009,-1.59056 11.13393,-42.94518 11.13393,-42.94518 0,0 -3.18112,-18.29146 -20.67731,-27.83484 -17.49618,-9.54337 -42.1499,-10.33865 -42.1499,-10.33865 z" id="mouth" opacity="1" fill="#ffb380" stroke="#5a0500" stroke-width="2" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 216.1187,517.34618 c 0,0 11.92922,1.59056 20.67731,0.79529 8.74809,-0.79529 21.47259,-7.15754 21.47259,-7.15754 l -0.79528,-0.79528" id="smile-stroke" fill="none" stroke="#5a0500" stroke-width="4" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 253.60703,492.69247 c 0,0 -4.99192,9.54337 4.66157,18.29146 9.65349,8.74809 19.19687,3.18112 19.19687,3.18112" id="smile-stroke-curve" fill="none" stroke="#510000" stroke-width="4" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 243.26838,479.17268 c 0,0 -2.60749,-42.01571 15.90561,-56.46495 16.30327,-12.72451 33.78076,-20.32942 51.69328,-17.49619 30.16796,4.77168 42.1499,36.18529 42.94519,53.68148 0.79529,17.49618 -1.31329,63.2343 -9.54338,74.75643 -7.95281,11.13393 -19.88203,18.29146 -37.37821,23.06315 -17.49619,4.77169 -25.84664,1.59056 -25.84664,1.59056 0,0 3.9764,-4.77169 5.96461,-9.14573 1.98819,-4.37405 2.78348,-23.4608 1.98819,-29.02777 -0.79527,-5.56697 -10.41005,-24.86989 -17.09853,-30.22068 -7.95282,-6.36224 -28.63012,-10.7363 -28.63012,-10.7363 z" id="head" opacity="1" fill="#a05a2c" stroke="#000" stroke-width=".82281" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 301.72154,468.03875 c 0,0 7.15753,-10.33865 15.11034,-14.31506 6.44128,-3.22066 21.47259,11.13393 11.92922,27.43719 -9.54337,16.30327 -15.90562,19.08676 -15.90562,19.08676" id="ear" fill="none" stroke="#230000" stroke-width="1.64562" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 296.15457,463.26707 5.56697,4.77168 c 0,0 4.77169,13.91742 1.9882,19.88203" id="ear-frontline" fill="none" stroke="#300" stroke-width="1.64562" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 308.87907,487.52314 c 0,0 10.33865,-9.14573 9.14573,-13.91742" id="ear-line" fill="none" stroke="#290000" stroke-width="1.64562" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 248.63652,439.20981 c 0,0 11.67255,-8.86825 23.85844,-2.9823 7.91888,3.82492 10.33865,23.26197 8.54927,31.01596 -1.86057,8.06247 -13.12214,21.07495 -13.12214,21.07495 l -24.65371,-9.14574 -0.59647,-19.6832 c -0.0604,-6.57787 1.84881,-11.35516 5.96461,-20.27967 z" id="eye-outer" opacity="1" fill="#ffe6d5" stroke="#000" stroke-width="1" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 243.86483,450.94021 c 0,0 10.13984,-4.37405 14.31507,-1.98821 3.55874,2.03356 7.75399,6.16343 7.35635,9.7422 -0.39765,3.57876 -0.39764,10.13983 -2.78348,15.50798 -2.1966,4.94235 -6.95872,9.74219 -6.95872,9.74219 l -12.52567,-4.77169 c 0,0 -0.87441,-10.33271 -1.19292,-15.11034 -0.39765,-5.9646 1.78937,-13.12213 1.78937,-13.12213 z" id="eye-middle" opacity="1" fill="#f9f9f9" stroke="#000" stroke-width="1" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 242.27427,464.06234 c 0,0 4.57787,-4.41223 7.15754,-4.9705 3.12901,-0.67716 6.82758,0.92123 7.35635,3.97641 0.86643,5.00624 0.0376,10.05929 -1.39174,13.12213 -1.39176,2.9823 -5.16933,4.97051 -5.16933,4.97051 l -6.95871,-1.98821 c 0.13254,-5.03678 -2.70039,-4.56547 -0.99411,-15.11034 z" id="eye-inner" fill="#000" stroke="#000" stroke-width=".82281px"/>
    <path d="m 272.29614,559.89372 c 0,0 -15.90563,22.26788 -19.08675,36.1853 -3.18113,13.91742 -3.18113,21.07495 -3.18113,21.07495 0,0 -16.7009,-0.79528 -30.22068,-1.98821 -13.51978,-1.19292 -44.53575,-0.39764 -44.53575,-0.39764 l -13.12213,-7.55516 c 0,0 -3.57877,5.56696 -10.7363,7.15752 -7.15753,1.59057 -14.7127,-3.18112 -14.7127,-3.18112 l -6.36225,0.39764 c 0,0 -1.59056,8.35045 0,8.74809 1.59057,0.39764 11.92922,3.18112 11.92922,3.18112 l 13.12213,-0.39763 h -15.11034 c 0,0 -12.32685,0 -14.7127,3.57877 -2.38585,3.57876 1.98821,6.36224 4.37405,8.35044 2.38585,1.98821 7.55517,1.98821 7.55517,1.98821 l 11.92922,0.39764 5.9646,-2.38585 -6.36224,1.59057 h -17.49619 l -3.9764,1.59056 c 0,0 -2.38585,3.97641 -0.39764,4.77168 1.9882,0.79528 12.32685,4.77169 12.32685,4.77169 l 11.92922,-1.59056 -13.12213,1.19292 -8.7481,1.59056 c 0,0 -2.38584,1.59057 -1.9882,3.57877 0.39764,1.9882 9.14573,4.37405 9.14573,4.37405 l 8.74809,1.19291 8.74809,-2.38584 16.70091,-13.51977 23.06315,3.9764 c 0,0 30.22068,9.14573 44.13811,9.54337 13.91742,0.39765 25.05136,-4.77168 28.63012,-8.35045 3.57876,-3.57877 21.47259,-13.91742 23.06315,-20.27967 1.59057,-6.36225 -4.77169,11.92922 -4.77169,18.29147 0,6.36225 -0.39764,29.82304 -4.37404,36.18529 -3.97641,6.36225 -4.37405,12.32686 -14.7127,19.08675 -10.33866,6.75989 -22.66551,10.33865 -22.66551,10.33865 l -1.59057,16.70091 c 0,0 -3.57876,5.16932 -6.36225,7.55517 -2.78348,2.38584 -33.79945,14.31506 -38.17349,20.67731 -4.37405,6.36225 -17.09855,36.18529 -17.09855,36.18529 l -15.90562,52.48856 c 0,0 -8.07756,-2.19288 -20.80205,-1.79524 -12.7245,0.39764 -15.68124,-1.44558 -20.15494,1.79524 -15.06092,10.9104 25.48992,29.93946 20.27968,28.63012 -4.45671,-1.11997 23.46079,8.35045 23.46079,8.35045 0,0 10.7363,9.54338 15.90563,6.36225 5.16933,-3.18112 9.54337,-15.90563 10.73629,-21.47259 1.19292,-5.56697 31.01596,-66.00834 31.01596,-66.00834 0,0 2.78349,-7.15753 18.68912,-5.96461 15.90561,1.19293 48.99072,-0.21126 68.39418,-15.11034 22.26787,-17.09854 28.23247,-31.4136 30.22068,-37.37821 1.98819,-5.9646 11.53157,-49.30743 8.35045,-56.46496 -3.18112,-7.15754 -3.18112,-27.83484 -1.98821,-30.61833 1.19293,-2.78348 7.55518,-42.54754 5.96461,-53.68147 -1.59055,-11.13394 -5.96461,-32.2089 -10.73629,-36.98058 -4.77169,-4.77169 -16.7009,-15.90562 -16.7009,-15.90562 0,0 -16.70091,8.35045 -25.84664,8.74809 -9.14573,0.39764 -28.63012,2.78348 -28.63012,2.78348 z" id="body" fill="#a05a2c" stroke="#000" stroke-width=".82281" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 250.4259,654.92982 c 0,0 -9.54337,16.70091 -9.54337,27.83484 0,11.13394 2.38585,28.23248 2.38585,28.23248 0,0 19.08674,-2.78348 24.65371,-9.94101 5.56697,-7.15753 18.29147,-18.29147 18.29147,-43.74046 0,-25.449 4.77168,-33.40182 4.77168,-33.40182 0,0 -15.11034,16.70091 -22.26787,21.4726 -7.15753,4.77168 -18.29147,9.54337 -18.29147,9.54337 z" id="body-light" fill="#ffb380" stroke="#000" stroke-width=".82281px"/>
    <path d="m 255.99287,557.90552 c 0,0 -21.47259,11.92922 -29.4254,28.63012 -7.95281,16.70091 -62.03193,4.77169 -62.03193,4.77169 l -2.38584,15.90563 13.12213,7.55516 41.75227,-0.39764 33.00416,2.78349 6.95285,-27.4372 15.31503,-29.82305 z" id="back-hand" fill="#a05a2c" stroke="#000" stroke-width=".82281px"/>
    <path d="m 127.5267,579.37811 c 0,0 -0.98824,7.29398 8.37872,9.54337 3.09318,0.7428 15.11034,-1.59055 15.11034,-1.59055 0,0 5.56697,-10e-6 0.79528,-6.36226 -4.77168,-6.36225 -14.31506,-10.33865 -14.31506,-10.33865 z" id="backfinger2" fill="#a05a2c" stroke="#000" stroke-width=".82281px"/>
    <path d="m 134.31485,588.12621 c 0,0 -10.33865,-3.97641 -11.92921,1.59056 -1.59056,5.56696 12.7245,9.54337 12.7245,9.54337 l 11.13393,-2.38584 4.77169,-9.54337 z" id="backfinger3" fill="#a05a2c" stroke="#000" stroke-width=".82281px"/>
    <path d="m 138.09479,571.99783 c -1.12814,3.44384 -0.79302,-8.64098 0.60486,-12.90822 l 9.876,0.0566 6.919,2.9821 2.48222,14.0925 -6.26523,6.37941 z" id="backfinger1" fill="#a05a2c" stroke="#000" stroke-width=".82281px"/>
    <path d="m 242.90752,718.17137 c 0,0 -34.86563,5.62349 -47.23729,13.49637 -12.37168,7.87288 -15.74577,12.37167 -15.74577,12.37167 0,0 -10.68462,21.36925 -13.49637,32.05387 -2.81174,10.68463 -10.64064,34.71165 -10.64064,34.71165 l -12.7245,-3.18113 c 0,0 -11.50048,-3.97543 -17.12396,0.52336 -5.6235,4.49879 -5.6235,6.18584 -1.1247,9.55993 4.49878,3.37409 17.99516,17.43281 25.86804,16.87046 7.87287,-0.56235 14.05872,-0.56235 14.05872,-0.56235 h 0.56235 l 2.24939,-0.56235 c 0,0 22.49394,-70.29358 32.05387,-77.04177 9.55993,-6.74818 37.67737,-23.0563 37.67737,-23.0563 l 4.39378,-5.65673 z" id="back-leg" fill="#a05a2c" stroke="#000" stroke-width=".82281px"/>
    <path d="m 141.68475,830.64111 0.56235,12.37167 21.8908,1.5916 1.1655,-10.58918 -14.05873,1.1247 z" id="connecting-root" fill="green" stroke="#000" stroke-width="0" stroke-miterlimit="4" stroke-dasharray="none"/>
    <path d="m 341.88088,744.03941 c 0,0 10.68463,7.87288 26.99274,-0.56235 16.30812,-8.43523 30.92918,-23.61864 30.92918,-23.61864 0,0 11.80932,-41.61381 8.99758,-57.92192 -2.81174,-16.30811 5.06113,-55.67252 -1.68704,-84.91465 -6.74819,-29.24214 10.12227,-51.73608 10.12227,-51.73608 0,0 24.74334,-18.55751 33.74092,-14.05872 8.99758,4.49879 22.49395,16.30811 9.55993,24.181 -12.93402,7.87287 -23.61865,10.12227 -26.99274,22.49395 -3.37409,12.37166 -3.93644,73.66767 0,93.91223 3.93644,20.24455 -3.37409,65.23244 -7.31053,71.98063 -3.93644,6.74818 -13.49637,35.99031 -33.17858,38.80206 -19.6822,2.81174 -39.92675,2.24939 -47.79964,-2.81175 -7.87287,-5.06114 -9.55992,-7.87288 -9.55992,-7.87288 z" id="tail" fill="#a05a2c" stroke="#000" stroke-width=".82281px"/>
  </g>
</svg>
  <p class="instruc">Tap</p>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Raleway:400,400i,700");

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  overflow-x:hidden;
  background-color:#d9d3f5;
  font-family:"Raleway", sans-serif;
}

.instruc{
  position: absolute;
  bottom:0;
  right:0;
  font-weight: 700;
  padding:10px;
  font-size:2rem;
  color:#02197d;
}

.container{
  height:100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.monkey{
  position: absolute;
  top:-50px;
}
              
            
!

JS

              
                const monkey = document.querySelector(".monkey");

const t1 = gsap.timeline({paused:true});

t1.to(monkey, {
  rotation:20,
  transformOrigin:"50% 0%",
  duration:0.7,
})
.to(monkey, {
  rotation:-20,
  transformOrigin:"50% 0%",
  duration:0.6
})
.to(monkey, {
  rotation:0,
  transformOrigin:"50% 0%",
  duration:2,
  ease: Bounce.easeOut
});

monkey.addEventListener("click", () => {
  t1.restart();
})
              
            
!
999px

Console