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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

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.

HTML

            
              .canvas
  .ear.left
  .ear.right
  .head
    .cheeks
    .sides
    .sides_r
    .bottom_jaw
    .face_b
    .eye.left
    .eye.right
    .eye_mark
    .mouth_top
    .mouth_bottom
    .mouth_lips
    .nose_top
    .nose_middle
    .nose_bottom
    .nosetril_top
    .nosetril_bottom
    .marks
      .forehead
        .first
        .second
        .third
        .fourth
      .side_cheek.left
      .side_cheek.right
      .chin
      .side_jaw.left
      .side_jaw.right
      .under_jaw
            
          
!

CSS

            
              * {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #b9ab56;
}

.canvas {
  width: 300px;
  height: 325px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.ear {
  position: absolute;
  top: 2%;
  background: #f8b116;
  width: 18%;
  height: 30%;
  &.left {
    left: 5%;
    transform: rotate(-50deg);
    border-radius: 50% 0 0 40%;
  }
  &.right {
    right: 5%;
    transform: rotate(50deg);
    border-radius: 0 50% 40% 0;
  }
  &.left:before {
    content: '';
    position: absolute;
    right: -1.5%;
    border-top: 75px solid transparent;
    border-right: 25px solid #000;
  }
  &.right:before {
    content: '';
    position: absolute;
    left: -1.5%;
    border-top: 75px solid transparent;
    border-left: 25px solid #000;
  }
}

.head {
  position: absolute;
  top: 2%;
  left: 15%;
  width: 70%;
  height: 64%;
  background: #f99d1f;
  border-radius: 50%;
  .cheeks {
    &:before {
      content: '';
      position: absolute;
      top: 40%;
      left: -7%;
      width: 30%;
      height: 60%;
      background: #f8b116;
      transform: rotate(20deg);
    }
    &:after {
      content: '';
      position: absolute;
      top: 40%;
      right: -7%;
      width: 30%;
      height: 60%;
      background: #f8b116;
      transform: rotate(-20deg);
    }
  }
  .sides {
    &:before {
      content: '';
      position: absolute;
      top: 18%;
      left: 3%;
      width: 0;
      height: 0;
      border-top: 60px solid transparent;
      border-left: 40px solid #f99d1f;
      transform: rotate(40deg);
    }
    &:after {
      content: '';
      position: absolute;
      top: 38%;
      left: -10%;
      width: 0;
      height: 0;
      border-bottom: 130px solid transparent;
      border-right: 50px solid #f99d1f;
      transform: rotate(10deg);
    }
  }
  .sides_r {
    &:before {
      content: '';
      position: absolute;
      top: 18%;
      right: 3%;
      width: 0;
      height: 0;
      border-top: 60px solid transparent;
      border-right: 40px solid #f99d1f;
      transform: rotate(-40deg);
    }
    &:after {
      content: '';
      position: absolute;
      top: 38%;
      right: -10%;
      width: 0;
      height: 0;
      border-bottom: 130px solid transparent;
      border-left: 50px solid #f99d1f;
      transform: rotate(-10deg);
    }
  }
  .bottom_jaw {
    position: absolute;
    bottom: -18%;
    left: -.5%;
    width: 0;
    height: 0;
    border-top: 40px solid #f99d1f;
    border-left: 105px solid transparent;
    border-right: 105px solid transparent;
  }
  .face_b {
    position: absolute;
    bottom: 1%;
    left: 1%;
    width: 98%;
    height: 60%;
    background: #f99d1f;
  }
  .eye {
    &.left:before {
      content: '';
      position: absolute;
      top: 50%;
      left: 10%;
      border-top: 20px solid #000;
      border-left: 40px solid transparent;
      border-right: 20px solid transparent;
    }
    &.right:before {
      content: '';
      position: absolute;
      top: 50%;
      right: 11%;
      border-top: 20px solid #000;
      border-left: 20px solid transparent;
      border-right: 40px solid transparent;
    }
    &.left:after {
      content: '';
      position: absolute;
      top: 33.5%;
      left: 10%;
      border-bottom: 35px solid #eae7d3;
      border-left: 20px solid transparent;
      border-right: 40px solid transparent;
    }
    &.right:after {
      content: '';
      position: absolute;
      top: 33.5%;
      right: 11%;
      border-bottom: 35px solid #eae7d3;
      border-left: 40px solid transparent;
      border-right: 20px solid transparent;
    }
  }
  .eye_mark {
    &:before {
      content: '';
      position: absolute;
      top: 56.3%;
      left: 6.5%;
      border-bottom: 20px solid #eae7d3;
      border-left: 40px solid transparent;
      border-right: 34px solid transparent;
      transform: rotate(53deg);
    }
    &:after {
      content: '';
      position: absolute;
      top: 56.3%;
      right: 7.5%;
      border-bottom: 20px solid #eae7d3;
      border-left: 34px solid transparent;
      border-right: 40px solid transparent;
      transform: rotate(-53deg);
    }
  }
  .mouth_top {
    position: absolute;
    bottom: -23%;
    left: 22%;
    width: 54%;
    height: 38%;
    background: #eae7d3;
    &:before {
      content: '';
      position: absolute;
      top: -49.5%;
      left: 0;
      border-bottom: 40px solid #eae7d3;
      border-left: 57px solid transparent;
      border-right: 57px solid transparent;
    }
    &:after {
      content: '';
      position: absolute;
      bottom: -31.5%;
      left: 0;
      border-top: 25px solid #eae7d3;
      border-left: 57px solid transparent;
      border-right: 57px solid transparent;
    }
  }
  .mouth_bottom {
    position: absolute;
    bottom: -35%;
    left: 32%;
    width: 35%;
    height: 10%;
    background: #eae7d3;
    &:after {
      content: '';
      position: absolute;
      bottom: -85%;
      left: 0;
      border-top: 18px solid #eae7d3;
      border-left: 37px solid transparent;
      border-right: 37px solid transparent;
    }
  }
  .mouth_lips {
    &:before {
      content: '';
      position: absolute;
      bottom: -27.5%;
      left: 32%;
      border-bottom: 16px solid #000;
      border-left: 37px solid transparent;
      border-right: 37px solid transparent;
    }
    &:after {
      content: '';
      position: absolute;
      bottom: -28%;
      left: 32%;
      border-bottom: 6px solid #eae7d3;
      border-left: 37px solid transparent;
      border-right: 37px solid transparent;
    }
  }
  .nose_top {
    position: absolute;
    top: 3.5%;
    left: 32.8%;
    border-bottom: 25px solid #fec14f;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
  }
  .nose_middle {
    position: absolute;
    top: 15%;
    left: 32.8%;
    border-top: 130px solid #fec14f;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
  }
  .nose_bottom {
    position: absolute;
    top: 5%;
    left: 30.5%;
    border-bottom: 200px solid #fec14f;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
  }
  .nosetril_top {
    position: absolute;
    bottom: -5.5%;
    left: 30.5%;
    z-index: 2;
    border-top: 10px solid #fec14f;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
  }
  .nosetril_bottom {
    position: absolute;
    bottom: -20%;
    left: 30.5%;
    border-top: 40px solid #91642d;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
  }
}

.marks {
  .forehead {
    position: relative;
    left: 33%;
    width: 33%;
    .first {
      &:before {
        content: '';
        position: absolute;
        top: 10px;
        left: 10px;
        border-top: 35px solid transparent;
        border-right: 10px solid #000;
        transform: rotate(65deg);
      }
      &:after {
        content: '';
        position: absolute;
        top: 10px;
        right: 10px;
        border-top: 35px solid transparent;
        border-left: 10px solid #000;
        transform: rotate(-65deg);
      }
    }
    .second {
      &:before {
        content: '';
        position: absolute;
        top: 27px;
        left: 7px;
        border-top: 40px solid transparent;
        border-right: 10px solid #000;
        transform: rotate(65deg);
      }
      &:after {
        content: '';
        position: absolute;
        top: 27px;
        right: 7px;
        border-top: 40px solid transparent;
        border-left: 10px solid #000;
        transform: rotate(-65deg);
      }
    }
    .third {
      &:before {
        content: '';
        position: absolute;
        top: 50px;
        left: 15px;
        border-top: 30px solid transparent;
        border-right: 7px solid #000;
        transform: rotate(55deg);
      }
      &:after {
        content: '';
        position: absolute;
        top: 50px;
        right: 15px;
        border-top: 30px solid transparent;
        border-left: 7px solid #000;
        transform: rotate(-55deg);
      }
    }
    .fourth {
      &:before {
        content: '';
        position: absolute;
        top: 70px;
        left: 15px;
        border-top: 20px solid transparent;
        border-right: 7px solid #000;
        transform: rotate(50deg);
      }
      &:after {
        content: '';
        position: absolute;
        top: 70px;
        right: 15px;
        border-top: 20px solid transparent;
        border-left: 7px solid #000;
        transform: rotate(-50deg);
      }
    }
  }
  .side_cheek {
    &.left {
      position: absolute;
      top: 36%;
      left: 4%;
      height: 47%;
      border-top: 8px solid transparent;
      border-left: 10px solid #000;
      border-right: 10px solid transparent;
      border-bottom: 8px solid #000;
      transform: rotate(-15deg);
      &:after {
        content: '';
        position: absolute;
        top: -22px;
        left: -3px;
        border-top: 25px solid transparent;
        border-left: 13px solid #000;
        transform: rotate(50deg);
      }
    }
    &.right {
      content: '';
      position: absolute;
      top: 36%;
      right: 4%;
      height: 47%;
      border-top: 8px solid transparent;
      border-left: 10px solid transparent;
      border-right: 10px solid #000;
      border-bottom: 8px solid #000;
      transform: rotate(15deg);
      &:after {
        content: '';
        position: absolute;
        top: -22px;
        right: -3px;
        border-top: 25px solid transparent;
        border-right: 13px solid #000;
        transform: rotate(-50deg);
      }
    }
  }
  .chin {
    &:before {
      content: '';
      position: absolute;
      bottom: 5%;
      left: 10%;
      border-left: 20px solid #000;
      border-top: 10px solid transparent;
      transform: rotate(20deg);
    }
    &:after {
      content: '';
      position: absolute;
      bottom: 5%;
      right: 10%;
      border-right: 20px solid #000;
      border-top: 10px solid transparent;
      transform: rotate(-20deg);
    }
  }
  .side_jaw {
    &.left {
      &:before {
        content: '';
        position: absolute;
        top: 36.5%;
        left: -1.5%;
        border-left: 15px solid #000;
        border-top: 90px solid transparent;
        border-bottom: 40px solid transparent;
        transform: rotate(-5deg);
      }
      &:after {
        content: '';
        position: absolute;
        top: 36.5%;
        left: -2%;
        border-left: 5px solid #fcb316;
        border-top: 90px solid transparent;
        border-bottom: 40px solid transparent;
        transform: rotate(-5deg);
      }
    }
    &.right {
      &:before {
        content: '';
        position: absolute;
        top: 36.5%;
        right: -1.5%;
        border-right: 15px solid #000;
        border-top: 90px solid transparent;
        border-bottom: 40px solid transparent;
        transform: rotate(5deg);
      }
      &:after {
        content: '';
        position: absolute;
        top: 36.5%;
        right: -2%;
        border-right: 5px solid #fcb316;
        border-top: 90px solid transparent;
        border-bottom: 40px solid transparent;
        transform: rotate(5deg);
      }
    }
  }
  .under_jaw {
    &:before {
      content: '';
      position: absolute;
      bottom: -6.9%;
      left: -.5%;
      border-top: 8px solid #000;
      border-left: 15px solid transparent;
      border-right: 33px solid transparent;
      transform: rotate(20deg);
    }
    &:after {
      content: '';
      position: absolute;
      bottom: -6.9%;
      right: -.5%;
      border-top: 8px solid #000;
      border-left: 35px solid transparent;
      border-right: 15px solid transparent;
      transform: rotate(-20deg);
    }
  }
}
            
          
!

JS

            
              
            
          
!
999px

Console