css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

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

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              .paper_man_wrapper
  .paper_man
    .paper_man_body.part
      .paper_man_head.part
      .paper_man_arm.left
        .paper_man_arm_1.part
          .paper_man_arm_2.part
            .paper_man_arm_hand.part
      .paper_man_arm.right
        .paper_man_arm_1.part
          .paper_man_arm_2.part
            .paper_man_arm_hand.part
      .paper_man_leg.left
        .paper_man_leg_1.part
          .paper_man_leg_2.part
            .paper_man_leg_foot.part
      .paper_man_leg.right
        .paper_man_leg_1.part
          .paper_man_leg_2.part
            .paper_man_leg_foot.part
            
            
          
!
            
              body {
  background: #fff;
  height: 100vh;
  overflow: hidden;
  display: flex;
  font-family: 'Anton', sans-serif;
  justify-content: center;
  align-items: center;
  perspective: 500px;
}

div {
  position: absolute;
  transform-style: preserve-3d;
}

.paper_man_wrapper {
  animation: cameraY 7000ms linear infinite;
}
.paper_man {
  top: -100px;
  left: -50px;
  animation: cameraX 5000ms ease-in-out infinite alternate;
  .part {
    background: rgba(0, 0, 0, 1);
    backface-visibility: hidden;
    &::before {
      content: '';
      position: absolute;
      width: 100%;
      height: 100%;
      background: rgba(100, 100, 100, 1);
      transform: rotateY(180deg);
      backface-visibility: hidden;
    }
  }
  &_body {
    transform-origin: 50% 100%;
    transform: rotateX(-20deg);
    width: 60px;
    height: 100px;
    animation: shake4 2000ms -100ms ease-in-out infinite;
  }
  &_head {
    transform-origin: 50% 100%;
    top: -40px;
    left: calc(50% - 20px);
    width: 40px;
    height: 40px;
    transform: rotateX(-10deg);
    animation: shake4 1000ms -800ms ease-in-out infinite;
  }
  &_arm {
    &.left {
      transform-origin: 0 0;
      right: 0px;
      animation: shake1 1000ms -400ms ease-in-out infinite;
    }
    &.right {
      transform-origin: 100% 0;
      left: -20px;
      animation: shake1 1000ms -900ms ease-in-out infinite;
    }
    &_1 {
      transform-origin: 50% 0;
      width: 20px;
      height: 50px;
    }
    &_2 {
      transform-origin: 50% 0;
      bottom: -50px;
      width: 20px;
      height: 50px;
      .left & {
        animation: shake3 1000ms -800ms ease-in-out infinite;
      }
      .right & {
        animation: shake3 1000ms -300ms ease-in-out infinite;
      }
    }
    &_hand {
      transform-origin: 50% 0;
      bottom: -15px;
      width: 20px;
      height: 15px;
      .left & {
        animation: shake3 1000ms -200ms ease-in-out infinite;
      }
      .right & {
        animation: shake3 1000ms -700ms ease-in-out infinite;
      }
    }
  }
  &_leg {
    transform-origin: 50% 0;
    top: 100px;
    &.left {
      right: 30px;
      animation: shake1 1000ms ease-in-out infinite;
    }
    &.right {
      left: 0;
      animation: shake1 1000ms -500ms ease-in-out infinite;
    }
    &_1 {
      transform-origin: 50% 0;
      width: 30px;
      height: 50px;
    }
    &_2 {
      transform-origin: 50% 0;
      bottom: -40px;
      width: 30px;
      height: 40px;
      .left & {
        animation: shake2 1000ms -600ms ease-in-out infinite;
      }
      .right & {
        animation: shake2 1000ms -100ms ease-in-out infinite;
      }
    }
    &_foot {
      transform-origin: 50% 0;
      bottom: -20px;
      width: 30px;
      height: 20px;
      .left & {
        animation: shake3 1000ms -400ms ease-in-out infinite;
      }
      .right & {
        animation: shake3 1000ms -900ms ease-in-out infinite;
      }
    }
  }
}

@keyframes shake1 {
  0% {
    transform: rotateX(80deg);
  }
  50% {
    transform: rotateX(-80deg);
  }
  100% {
    transform: rotateX(80deg);
  }
}

@keyframes shake2 {
  0% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(-100deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

@keyframes shake3 {
  0% {
    transform: rotateX(10deg);
  }
  50% {
    transform: rotateX(120deg);
  }
  100% {
    transform: rotateX(10deg);
  }
}

@keyframes shake4 {
  0% {
    transform: rotateX(-30deg);
  }
  50% {
    transform: rotateX(-10deg);
  }
  100% {
    transform: rotateX(-30deg);
  }
}

@keyframes cameraY {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

@keyframes cameraX {
  0% {
    transform: rotateX(-50deg);
  }
  100% {
    transform: rotateX(50deg);
  }
}

            
          
!
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