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.

            
              .cat
  .head
    .face
      .stripes
        .top
        .left
        .right
      .eyes
        .left
        .right
      .nose
      .mouth
    .ears
      .left
      .right
  .suit
    .collar
      .top
    .arms
      .left
      .right
    .paws
      .left
      .right
    .body
  .tail
  .shadow
            
          
!
            
              @white: #FFF;
@black: #000;
@orange: #F89C31;
@light-orange: #FAB96A;
@dark-orange: #D15B2A;
@green: #A4FFC4;
@blue: #0C5C9C;
@light-blue: #AAE0FB;
@red: #CB1B2E;

body {
  background: @green;
}

.cat {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  .head {
    position: relative;
    transform-origin: 50% 100%;
    animation: 15s nod infinite;
    z-index: 10;
  }
  .face {
    position: relative;
    width: 200px;
    height: 150px;
    background: @orange;
    border: 8px solid @black;
    border-top-left-radius: 100px 100px;
    border-top-right-radius: 100px 100px;
    border-bottom-left-radius: 100px 50px;
    border-bottom-right-radius: 100px 50px;
    box-shadow: inset 0 16px 0 4px darken(@orange, 10%);
    overflow: hidden;
    z-index: 2;
    .stripes {
      .top {
        position: absolute;
        left: 50%;
        transform: translate(-50%, -20px);
        width: 15px;
        height: 70px;
        background: @dark-orange;
        border-radius: 100%;
        &:before, &:after {
          display: block;
          content: '';
          width: 10px;
          height: 60px;
          background: @dark-orange;
          border-radius: 100%;
        }
        &:before {
          position: absolute;
          top: 5px;
          right: 20px;
        }
        &:after {
          position: absolute;
          top: 5px;
          left: 20px;
        }
      }
      .left {
        position: absolute;
        bottom: 40px;
        left: -20px;
        width: 70px;
        height: 15px;
        background: @dark-orange;
        border-radius: 100%;
        transform: rotate(-15deg);
        &:before, &:after {
          display: block;
          content: '';
          width: 60px;
          height: 10px;
          background: @dark-orange;
          border-radius: 100%;
        }
        &:before {
          position: absolute;
          top: 20px;
          left: -5px;
        }
        &:after {
          position: absolute;
          bottom: 20px;
          left: -5px;
        }
      }
      .right {
        position: absolute;
        bottom: 40px;
        right: -20px;
        width: 70px;
        height: 15px;
        background: @dark-orange;
        border-radius: 100%;
        transform: rotate(15deg);
        &:before, &:after {
          display: block;
          content: '';
          width: 60px;
          height: 10px;
          background: @dark-orange;
          border-radius: 100%;
        }
        &:before {
          position: absolute;
          top: 20px;
          right: -5px;
        }
        &:after {
          position: absolute;
          bottom: 20px;
          right: -5px;
        }
      }
    }
    .eyes {
      position: absolute;
      top: 55px;
      width: 100%;
      height: 50px;
      border-radius: 100px;
      overflow: hidden;
      &:before {
        display: block;
        content: '';
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translate(-50%, 0);
        width: 150px;
        background: @orange;
        border-radius: 100%;
        z-index: 10;
        animation: 5s scowl infinite;
      }
      .left, .right {
        position: absolute;
        top: -25px;
        &:before {
          display: block;
          content: '';
          width: 60px;
          height: 60px;
          background: @white;
          border-radius: 100%;
        }
        &:after {
          display: block;
          content: '';
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 30px;
          height: 30px;
          background: @black;
          border-radius: 100%;
        }
      }
      .left {
        left: 30px;
      }
      .right {
        right: 30px;
      } 
    }
    .nose {
      position: absolute;
      bottom: 60px;
      left: 50%;
      transform: translate(-50%, 0);
      width: 20px;
      height: 15px;
      background: @light-orange;
      border-left: 4px solid @black;
      border-right: 4px solid @black;
      border-bottom: 6px solid @black;
      border-top-left-radius: 30px 30px;
      border-top-right-radius: 30px 30px;
      border-bottom-left-radius: 20px 10px;
      border-bottom-right-radius: 20px 10px;
      z-index: 5;
      &:after {
        display: block;
        content: '';
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translate(-50%, 0);
        width: 10px;
        height: 20px;
        background: @black;
      }
    }
    .mouth {
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translate(-50%, 0);
      width: 80px;
      height: 60px;
      background: @white;
      border-top-left-radius: 40px 40px;
      border-top-right-radius: 40px 40px;
      border-bottom-left-radius: 40px 20px;
      border-bottom-right-radius: 40px 20px;
      &:before {
        display: block;
        content: '';
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translate(-50%, 0);
        width: 50px;
        height: 50px;
        border-top: 8px solid @black;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-radius: 100%;
      }
    }
  }
  .ears {
    .left {
      position: absolute;
      top: 0px;
      left: -25px;
      width: 80px;
      height: 80px;
      background: darken(@light-orange, 10%);
      border: 8px solid @black;
      border-radius: 20px;
      border-bottom-left-radius: 80px;
      box-shadow: inset 0 0 0 15px darken(@orange, 10%);
      transform: rotate(20deg);
      z-index: 0;
    }
    .right {
      position: absolute;
      top: 0px;
      right: -25px;
      width: 80px;
      height: 80px;
      background: darken(@light-orange, 10%);
      border: 8px solid @black;
      border-radius: 20px;
      border-bottom-right-radius: 80px;
      box-shadow: inset 0 0 0 15px darken(@orange, 10%);
      transform: rotate(-20deg);
      z-index: 0;
    }
  }
  .suit {
    position: relative;
    top: -20px;
    width: 200px;
    height: 120px;
    background: darken(@blue, 10%);
    border: 8px solid @black;
    border-top-left-radius: 40px 80px;
    border-top-right-radius: 40px 80px;
    box-shadow: inset 0 8px 0 0 @blue;
    .collar {
      position: absolute;
      left: 50%;
      transform: translate(-50%, 0), ;
      width: 20px;
      height: 60px;
      background: @red;
      border: 8px solid @black;
      border-bottom-left-radius: 100%;
      border-bottom-right-radius: 100%;
      box-shadow: inset 0 0px 0 5px darken(@red, 10%);
      .top {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translate(-50%, 0);
        width: 30px;
        height: 20px;
        background: @red;
        border: 8px solid @black;
        border-radius: 100%;
        box-shadow: inset 0 0px 0 5px darken(@red, 10%);
        z-index: 1;
      }
      &:before {
        display: block;
        content: '';
        position: absolute;
        top: -25px;
        left: -40px;
        width: 30px;
        height: 30px;
        background: @light-blue;
        border: 8px solid @black;
        box-shadow: inset 0 0px 0 5px darken(@light-blue, 10%);
        transform: rotate(55deg);
        z-index: 2;
      }
      &:after {
        display: block;
        content: '';
        position: absolute;
        top: -25px;
        right: -40px;
        width: 30px;
        height: 30px;
        background: @light-blue;
        border: 8px solid @black;
        box-shadow: inset 0 0px 0 5px darken(@light-blue, 10%);
        transform: rotate(-55deg);
        z-index: 2;
      }
    }
    .arms {
      .left {
        position: absolute;
        bottom: 0;
        left: 20px;
        width: 12px;
        height: 80px;
        background: @blue;
        border-right: 8px solid @black;
        border-top-left-radius: 80%;
        transform: rotate(10deg);
      }
      .right {
        position: absolute;
        bottom: 0;
        right: 20px;
        width: 12px;
        height: 80px;
        background: @blue;
        border-left: 8px solid @black;
        border-top-right-radius: 80% 40%;
        transform: rotate(-10deg);
      }
    }
    .paws {
      .left, .right {
        width: 70px;
        height: 30px;
        background: @orange;
        border: 8px solid @black;
        border-top-left-radius: 100%;
        border-top-right-radius: 100%;
        border-bottom-left-radius: 50px;
        border-bottom-right-radius: 50px;
        box-shadow: inset 0 4px 0 4px darken(@orange, 10%);
      }
      .left {
        position: absolute;
        bottom: -14px;
        left: -25px;
      }
      .right {
        position: absolute;
        bottom: -14px;
        right: -25px;
      }
    }
    .body {
      position: absolute;
      left: -80px;
      bottom: -8px;
      width: 200px;
      height: 120px;
      background: darken(@blue, 10%);
      border: 8px solid @black;
      border-top-left-radius: 100%;
      border-top-right-radius: 40px;
      border-bottom-left-radius: 40px;
      box-shadow: inset 0 10px 0 5px @blue;
      z-index: -1;
    }
  }
  .tail {
    position: absolute;
    left: -60px;
    bottom: 100px;
    width: 20px;
    height: 120px;
    background: @orange;
    border: 8px solid @black;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: inset 4px 4px 0 4px darken(@orange, 10%);
    transform: rotate(-45deg);
    transform-origin: 100% 100%;
    z-index: -2;
    animation: 5s wag infinite;
  }
  .shadow {
    position: absolute;
    bottom: -20px;
    left: -130px;
    width: 380px;
    height: 80px;
    background: darken(@green, 35%);
    border-radius: 100%;
    z-index: -3;
  }
}

@keyframes wag {
  0% {
    transform: rotate(-45deg);
  }
  50% {
    transform: rotate(-55deg);
  }
  100% {
    transform: rotate(-45deg);
  }
}

@keyframes scowl {
  0% {
    height: 30px;
  }
  50% {
    height: 20px;
  }
  100% {
    height: 30px;
  } 
}

@keyframes nod {
  0% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(5deg);
  }
  70% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0);
  }   
}
            
          
!
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