cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <body>
  <div id="canvas">
    <div id="sky"></div>
    <div class="tree" align="center" id="tree4">
      <div class="leaf" id="batch-top"></div>
      <div class="leaf" id="batch-middle"></div>
      <div class="leaf" id="batch-bottom"></div>
      <div id="trunk"></div>
    </div>
    <div class="tree" align="center" id="tree3">
      <div class="leaf" id="batch-top"></div>
      <div class="leaf" id="batch-middle"></div>
      <div class="leaf" id="batch-bottom"></div>
      <div id="trunk"></div>
    </div>
    <div class="tree" align="center" id="tree2">
      <div class="leaf" id="batch-top"></div>
      <div class="leaf" id="batch-middle"></div>
      <div class="leaf" id="batch-bottom"></div>
      <div id="trunk"></div>
    </div>
    <div class="tree" id="tree1">
      <div align="center">
        <div class="leaf" id="batch-top"></div>
        <div class="leaf" id="batch-middle"></div>
        <div class="leaf" id="batch-bottom"></div>
        <div id="trunk"></div>
      </div>
    </div>
    <div class="footprint">
      <div class="left"></div>
      <div class="right"></div>
    </div>
    <div id="man">
      <div id="body"></div>
      <div id="arms">
        <div id="arm-left"></div>
        <div id="arm-right"></div>
      </div>
      <div id="shoulders">
        <div id="shoulder-left"></div>
        <div id="shoulder-right"></div>
      </div>
      <div id="legs">
        <div id="leg-left"></div>
        <div id="leg-right"></div>
      </div>
      <div id="shoes">
        <div id="shoe-left"></div>
        <div id="shoe-right"></div>
      </div>
        <div id="head">
        <div id="hair">
          <div id="hair1"></div>
          <div id="hair2"></div>
          <div id="hair3"></div>
        </div>
        <div id="eyes">
          <div id="left-eye"></div>
          <div id="right-eye"></div>
        </div>
        <div id="mouth">
          <div id="mouth-top"></div>
          <div id="mouth-bottom"></div>
        </div>
        <div id="beard">
          <div id="beard1"></div>
          <div id="beard2"></div>
          <div id="beard3"></div>
        </div>
      </div>
    </div>
  </div>
</body>
            
          
!
            
              body {
  position:relative;
  margin:auto;
  background:#ffdab8d1;
}
div {
  border-radius:4px;
  position:absolute;
  transform-origin: top;
}
#canvas {
  position:relative;
  margin:auto;
  height:500px;
  overflow:hidden;
}
#sky{
  height: 200px;
  width:100%;
  background: lightblue;
}
#man{
  top:80px;
  left:300px;
}
#head {
  background:#C29D7B;
  height:200px;
  width:200px;
  animation:shaking-head 2s ease-in-out 1s infinite normal forwards running;
  transform-origin:50% 120%;
}
#hair div {
  background:#3E3123;
}
#hair #hair1,#hair3 {
  height:75px;
  width:20px;
}
#hair #hair2 {
  height:50px;
  width:200px;
}
#hair #hair3{
  left:180px;
}
#eyes div {
  background:#161616;
  height:50px;
  width:50px;
  top:75px;
}
#eyes #left-eye {
  left:20px;
}
#eyes #right-eye {
  left: 130px;
}
#mouth div{
  width:60px;
  left:70px;
  border-radius:0px;
}
#mouth #mouth-top{
  background:#63302F;
  height:30px;
  top:125px;
}
#mouth #mouth-bottom{
  background:#AE6E71;
  height:30px;
  top:155px;
}
#beard div {
  background:#50402F;
  border-radius:0;
}
#beard #beard1,#beard3 {
  height:50px;
  width:25px;
  top:150px;
}
#beard #beard1{
  left:45px;
}
#beard #beard3{
  left:130px;
}
#beard #beard2{
  height:20px;
  width:110px;
  left:45px;
  top:180px;
}
#body{
  background: #17708F;
  height:60px;
  width:80px;
  top:200px;
  left:60px;
  border-radius:0;
}
#arms div{
  background:#A47A56;
  height:85px;
  width:20px;
  top:200px;
  border-radius:0 0 4px 4px;
}
#arm-left,#shoulder-left{
  left:40px;
  animation:walking 2s ease-in-out 0s infinite normal forwards running;
}
#arm-right,#shoulder-right{
  left:140px;
  animation:walking 2s ease-in-out 1s infinite normal forwards running;
}
#shoulders div{
  background: #17708F;
  height:25px;
  width:20px;
  top:200px;
  border-radius:0;
}
#legs div {
  background:#2530B6;
  height:80px;
  width:39px;
  top:260px;
  border-radius:0 0 4px 4px;
}
#leg-left{
  left:60px;
  animation:walking 2s ease-in-out 1s infinite normal forwards running;
}
#leg-right{
  left:101px;
  animation:walking 2s ease-in-out 0s infinite normal forwards running;
}
#shoes div{
  background:#3E3E47;
  height:18px;
  width:39px;
  top:322px;
}
#shoe-left{
  left:60px;
  animation:walking-shoes 2s ease-in-out 1s infinite normal forwards running;
}
#shoe-right{
  left:101px;
  animation:walking-shoes 2s ease-in-out 0s infinite normal forwards running;
}
@keyframes walking {
  0%,10% {
    transform:scaleY(1);
  }
  50% {
    transform:scaleY(.5);
  }
  90%,100% {
    transform:scaleY(1);
  }
}
@keyframes walking-shoes {
  0%,10% {
    transform:translatey(0);
  }
  50% {
    transform:translatey(-40px);
  }
  90%,100% {
    transform:translatey(0);
  }
}
@keyframes shaking-head {
  0%,5%{
    transform:rotate(-5deg);
  }
  45%,55% {
    transform:rotate(5deg);
  }
  95%,100%{
    transform:rotate(-5deg);
  }
}
.tree div {
  position:relative;
}
.leaf {
  background: #439436;
  border-radius:2px 2px 0 0;

}
#batch-top {
  height:10px;
  width:15px;
}
#batch-middle {
  width:30px;
  height:15px;
}
#batch-bottom{
  width:40px;
  height:15px;
}
#trunk{
  background:#6F5B44;
  height: 18px;
  width:13px;
  border-radius:0 0 2px 2px;
}

#tree1 {
  top:550px;
  left:-220px;
  transform-origin:bottom;
  transform:scale(10);
  animation:tree-moving1 16s ease-out 0s infinite normal forwards running;
}
#tree2 {
  top:550px;
  left:980px;
  transform-origin:bottom;
  animation:tree-moving2 16s ease-out 4s infinite normal forwards running;
}
#tree3 {
  top:550px;
  left:-220px;
  transform-origin:bottom;
  transform:scale(10);
  animation:tree-moving1 16s ease-out 8s infinite normal forwards running;
}
#tree4 {
  top:550px;
  left:980px;
  transform-origin:bottom;
  animation:tree-moving2 16s ease-out 12s infinite normal forwards running;
}

@keyframes tree-moving1 {
  from {
    transform:scale(10);
  }
  to {
    transform:scale(1);
    transform:translate(650px,-400px);
  }
}
@keyframes tree-moving2 {
  from {
    transform:scale(10);
  }
  to {
    transform:scale(1);
    transform:translate(-650px,-400px);
  }
}
.footprint div {
  height:20px;
  width:39px;
  background:#000;
  top:398px;
  border-radius: 50% 50% 6px 6px;
}
.footprint .left{
  left:360px;
  opacity:0.2;
  transform-origin: right;
  animation:footprint-disappear 2s ease-in-out 1s infinite normal forwards running;
}
.footprint .right{
  left: 401px;
  opacity:0.2;
  transform-origin: left;
  animation:footprint-disappear 2s ease-in-out 0s infinite normal forwards running;
}

@keyframes footprint-disappear {
  0% {
    opacity:0;
  }
  10% {
    opacity:0.2;
  }
  20% {
    opacity:0.2;
    transform: translateY(-5px) scale(1,1);
  }
  100% {
    opacity:.1;
    transform: translateY(-15px) scale(0.8,0.6);
  }
}

.animation-paused {
  animation-play-state:paused !important;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console