Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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">
  <div class="head">
    <div class="hair ab"></div>
    <div class="hair-front-1 ab"></div>
    <div class="hair-tip-1 ab"></div>
    <div class="hair-tip-2 ab"></div>
    <div class="nose ab"></div>
    <div class="eyes r ab"></div>
    <div class="eyes l ab"></div>
    <div class="mouth ab"></div>
    <div class="ear l ab"></div>
    <div class="ear r ab"></div>
    <div class="dot ab"></div>
    <div class="cheek l ab"></div>
    <div class="cheek r ab"></div>
  </div>
  <div class="body">
    <div class="neck ab"></div>
    <div class="shirt ab"></div>
    <div class="b-dots ab"></div>
    <div class="black-circle ab"></div>
    <div class="star ab"></div>
    <div class="arm l ab">
      <div class="thumb ab"></div>
    </div>
    <div class="arm r ab"></div>
  </div>
  <div class="skin">
    <div class="belt ab">
      <div class="tri-up"></div>
      <div class="tri-up"></div>
      <div class="tri-up"></div>
      <div class="tri-up"></div>
      <div class="tri-up"></div>
      <div class="tri-up"></div>
      <div class="tri-up"></div>
      <div class="tri-up"></div>
    </div>
  </div>
  <div class="pants">
    <div class="leg l ab">
      <div class="grey-line ab"></div>
    </div>
    <div class="leg r ab">
      <div class="grey-line ab"></div>
    </div>
  </div>
  <div class="feet">
    <div class="sock l ab"></div>
    <div class="foot l ab"></div>
    <div class="sock r ab"></div>
    <div class="foot r ab"></div>
  </div>
  <div class="shadow"></div>
  <div class="tablet">
    <div class="writing">
      <div class="great ab"></div>
      <div class="h ab"></div>
      <div class="t ab"></div>
      <div class="m ab"></div>
      <div class="l ab"></div>
      <div class="plus ab"></div>
      <div class="c ab"></div>
      <div class="s ab"></div>
      <div class="s nd ab"></div>
      <div class="o ab"></div>
      <div class="n ab"></div>
      <div class="ll ab"></div>
      <div class="y ab"></div>
    </div>
    <div class="finger ab"></div>
  </div>
</div>

              
            
!

CSS

              
                // Colors
$skin: #ffeed0;
$skin-shadow: #c9bda3;
$light-brown: #837a5d;
$hair: #5b4c37;
$pink: #f27c6e;
$eye-blue: #9dd6c7;
$grey: #938f83;
$shirt: #6b5347;
$black: #231f1e;
$b-dots: #241e20;
$shadow: #dedede;


.ab {
  position: absolute;
  display: block;
}
.container {
  display: flex;
  margin-top: 10vh;
  align-items: center;
  flex-direction: column;
  width: 100%;
  min-height: 120vh;
  perspective: 1000px;
  @media (max-width: 500px) {
    margin-bottom: 33vh;
    padding: 0px 20px 20px;
  }
}

.head {
  border-radius: 51% 49% 49% 51% / 38% 39% 61% 62% ;
  width: 300px;
  height: 300px;
  background: $skin;
  position: relative;
  box-shadow: inset -20px 0px 5px 0px $skin-shadow;
  border: 2px solid #000;
  z-index: 1;
}
.nose {
  top: 20%;
  left: 50%;
  transform: translate(-50%, 0%);
  width: 30px;
  height: 100px;
  background: $light-brown;
  border-top-right-radius: 30px;
  border-top-left-radius: 30px;
  border-bottom-right-radius: 10px;
  border: 2px solid;
  border-color: transparent #000;
  z-index: 1;
//   lines
  &::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 80%;
    background: #000;
    left: 10px;
    bottom: 0;
    z-index: 2;
    box-shadow: 7px -6px 0px 0px black;
  }
//   piece
  &::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -2px;
    right: 0px;
    background: $light-brown;
    width: 35px;
    height: 20px;
    box-shadow: inset 0px 0px 0 2px black;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 5px;
    z-index: 3;
  }
}
.eyes {
  width: 70px;
  height: 70px;
  background: $eye-blue;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 7px $light-brown, inset 0 0 0 9.3px #000000;
  &.r {
    top: 25%;
    left: 24%;
    border-radius: 40% 60% 41% 59% / 49% 58% 42% 51% ;
  }
  &.l {
    top: 25%;
    right: 24%;
    border-radius: 64% 36% 33% 67% / 54% 47% 53% 46%;
  }
}
.mouth {
  bottom: 35%;
  left: 50%;
  transform: translateX(-50%) rotate(6deg);
  width: 120px;
  border-bottom: 5px solid #222;
  border-radius: 100%;
  height: 12px;
}
.ear {
  width: 20px;
  height: 50px;
  background: $skin;
  border: 2px solid #000;
  &.l {
    top: 45%;
    left: 0;
    transform: translateX(-30%);
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }
  &.r {
    top: 45%;
    right: 0;
    transform: translateX(48%);
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: inset -10px 0px 5px 0px $skin-shadow;
  }
}
.dot {
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 45px;
  height: 45px;
  border-radius: 53% 47% 41% 59% / 61% 49% 51% 39%;
  background: $pink;
  box-shadow: inset 0 0 0 2px black;
}
.cheek {
  transform: translateY(-50%);
  background: $grey;
  width: 50px;
  height: 90px;
  border: 2px solid;
  border-color: #000 transparent;
  &.l {
    left: 0;
    top: 50%;
    border-radius: 0% 100% 56% 44% / 19% 48% 52% 81% ;
  }
  &.r {
    right: 0;
    top: 50%;
    border-radius: 100% 0% 56% 44% / 44% 34% 66% 56% ;
  }
}
.hair {
  top: -30px;
  left: 0;
  width: 300px;
  height: 110px;
  background: $hair;
  border-radius: 26% 72% 2% 98%/44% 95% 16% 68%;
  box-shadow: inset 0px 0px 0 2px black;
  
  z-index: 3;
}
.hair-front-1 {
  border-radius: 82% 16% 100% 1%/29% 10% 100% 80%;
  background: $hair;
  width: 110px;
  height: 120px;
  z-index: 3;
  left: -1px;
  top: -22px;
  box-shadow: -2px 1px 0 1px black;
}
.hair-tip-1 {
  width: 35%;
  height: 15%;
  border-radius: 50%;
  transform: rotate(-65deg) scale(-1);
  box-shadow: 3vmin 0 $hair;
  clip-path: polygon(0% 50%, 150% 50%, 150% 100%, 0% 100%);
  z-index: 4;
  top: -80px;
  left: 20px;
}
.hair-tip-2 {
  width: 35%;
  height: 15%;
  border-radius: 50%;
  transform: rotate(-65deg) scale(-1);
  box-shadow: 3vmin 0 $hair;
  clip-path: polygon(0% 50%, 150% 50%, 150% 100%, 0% 100%);
  z-index: 4;
  top: -80px;
  left: 30px;
}
.body {
  position: relative;
  width: 300px;
  height: 300px;
  margin-top: -40px;
  z-index: 0;
}
.neck {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: $skin;
  width: 100px;
  height: 80px;
  z-index: 1;
  border-bottom-right-radius: 50px;
  border-bottom-left-radius: 50px;
  border: 2px solid #000;
  box-shadow: 0px 7px 0 3px $pink, 0px 7px 0 5px #000;
  &::before {
    content: '';
    width: 2px;
    height: 15px;
    position: absolute;
    z-index: 1;
    background-color: #000;
    bottom: 15px;
    left: 1px;
    box-shadow: 13px 17px 0 0px black, 
      32px 28px 0 0px black, 
      55px 29px 0 0px black, 
      78px 22px 0 0px black, 
      95px 3px 0 0px black;
  }
}
.shirt {
  top: 0;
  left: 0;
  background: $shirt;
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 0% 100% / 100% 100% 0% 0% ;
  border: 2px solid #000;
  box-shadow: inset -9px 3px 7px 0px #503c32;
}
.b-dots {
  width: 20px;
  height: 20px;
  background: $b-dots;
  border-radius: 53% 47% 41% 59% / 61% 49% 51% 39%;
  bottom: 5px;
  left: 15px;
  box-shadow: 50px 0 $b-dots, 
    105px 0 $b-dots, 
    160px 0 $b-dots, 
    210px 0 $b-dots;
}
.black-circle {
  top: 57%;
  left: 49%;
  transform: translate(-50%,-50%);
  background: #231f1f;
  width: 120px;
  height: 120px;
  border-radius: 50%;
}
.star {
  left: 26%;
  top: 31%;
  margin: 50px 0;
  position: relative;
  display: block;
  color: red;
  width: 0px;
  height: 0px;
  border-right: 73px solid transparent;
  border-bottom: 50px solid $eye-blue;
  border-left: 71px solid transparent;
  transform: rotate(35deg);
  &::before {
    border-bottom: 53px solid #9dd6c7;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    position: absolute;
    height: 0;
    width: 0;
    top: -27px;
    left: -53px;
    display: block;
    content: '';
    transform: rotate(-35deg);
  }
  &::after {
    position: absolute;
    display: block;
    color: #9dd6c7;
    top: 5px;
    left: -78px;
    width: 0px;
    height: 0px;
    border-right: 73px solid transparent;
    border-bottom: 50px solid #9dd6c7;
    border-left: 71px solid transparent;
    transform: rotate(-69deg);
    content: '';
  }
}
.arm {
  width: 300px;
  height: 280px;
  background: $shirt;
  border-radius: 50% 50% 0% 100% / 100% 100% 0% 0% ;
  border: 2px solid #000;
  z-index: -1;
  &.l {
    left: -40px;
    top: 30px;
    &::before {
      content: '';
      position: absolute;
      bottom: -20px;
      left: -2px;
      background: $grey;
      width: 40px;
      height: 20px;
      border: 2px solid #000;
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
      border-bottom-left-radius: 3px;
      border-bottom-right-radius: 3px;
      z-index: 2;
    }
    &::after {
      content: '';
      position: absolute;
      bottom: -80px;
      left: 2px;
      background: $skin;
      width: 35px;
      height: 60px;
      border: 2px solid #000;
      z-index: 1;
      border-bottom-left-radius: 90%;
    }
    .thumb {
      background: $skin;
      width: 12px;
      height: 30px;
      bottom: -53px;
      left: 25px;
      border: 2px solid #000;
      z-index: 2;
      border-bottom-left-radius: 90%;
    }
  }
  &.r {
    right: -40px;
    top: 30px;
    box-shadow: inset -9px 3px 7px 0px #503c32;
  }
}

.skin {
  position: relative;
  width: 300px;
  height: 20px;
  background: $skin;
  border: 2px solid #000;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  margin-left: 5px;
  margin-top: 2px;
  box-shadow: inset -7px -1px 10px 0px $skin-shadow;
}
.belt {
  height: 20px;
  width: 100%;
  background: #7d7a71;
  top: 16px;
  z-index: 1;
  border: 1px solid #000;
  display: flex;
  overflow: hidden;
  box-shadow: 0px 20px 0px 0px #7d7a71,  0px 21px 0 1px black;
  .tri-up {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 20px solid $pink;
  }
}
.pants {
  position: relative;
  z-index: 0;
  height: 300px;
}
.leg {
  width: 155px;
  height: 300px;
  background: $shirt;
  border-bottom-right-radius: 80px;
  border-bottom-left-radius: 80px;
  border: 2px solid #000;
  overflow: hidden;
  &.l {
    left: -7px;
    top: 0;
    box-shadow: inset -11px 7px 5px 0px #504038;
    .grey-line {
      background: $grey;
      width: 40px;
      height: 100%;
      box-shadow: 80px 0px $grey, 80px 0px 0 2px black;
      left: 10px;
      outline: 2px solid #000;
    }
  }
  &.r {
    right: -11px;
    top: 0;
    .grey-line {
      background: $grey;
      width: 40px;
      height: 100%;
      box-shadow: 80px 0px $grey, 80px 0px 0 2px black;
      left: 10px;
      outline: 2px solid #000;
    }
  }
}
.feet {
  position: relative;
  width: 300px;
  height: 40px;
}
.sock {
  width: 10px;
  height: 100%;
  background: $black;
  &.l {
    bottom: -3px;
    left: 75px;
    border-bottom-right-radius: 10px;
  }
  &.r {
    bottom: -3px;
    right: 75px;
    border-bottom-left-radius: 10px;
  }
}
.foot {
  width: 60px;
  height: 10px;
  background: $black;
  &.l {
    bottom: -3px;
    left: 20px;
    border-top-left-radius: 50%;
    border-bottom-left-radius: 30%;
    border-bottom-right-radius: 5px;
  }
  &.r {
    bottom: -3px;
    right: 20px;
    border-top-right-radius: 50%;
    border-bottom-right-radius: 30%;
    border-bottom-left-radius: 5px;
  }
}
.shadow {
  position: relative;
  width: 150px;
  height: 200px;
  background: $shadow;
  transform: translate(2px, -140px) translateZ(130px) rotate(-26deg) skewX(60deg);
  z-index: -1;
  border-radius: 50%;
  @media (max-width: 500px) {
    transform: translate(2px, -170px) translateZ(130px) rotate(-26deg) skewX(60deg);    
  }
}
.tablet {
  width: 140px;
  height: 200px;
  background: $grey;
  border: 2px solid #000;
  border-top-right-radius: 60px;
  border-top-left-radius: 60px;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  box-shadow: -4px 2px 0px 2px $grey, -7px 5px 0 2px black, inset -6px 0px 7px 0px #585858;
  transform: translateZ(20px) rotate(-15deg);
  z-index: 3;
  position: relative;
  margin-top: -720px;
  margin-left: 270px;
}
.finger {
  bottom: -12px;
  left: 60px;
  background: $skin;
  width: 13px;
  height: 25px;
  border-radius: 62% 38% 54% 46%/25% 51% 49% 75%;
  z-index: 1;
  box-shadow: 13px 0px $skin, 13px 0px 0 2px $black, 25px 0 $skin, 25px 0px 0 2px $black, 37px 0 0 $skin, 37px 0 0 2px $black;
  border: 2px solid $black;
}
.writing {
  position: relative;
  padding: 30px 20px;
  .great {
    width: 5px;
    height: 20px;
    background: #000;
    border-radius: 20px;
    transform: rotate(45deg);
    box-shadow: 77px -63px 0px 0px black;

    &::after {
      content: '';
      width: 5px;
      height: 20px;
      background: #000;
      position: absolute;
      transform: rotate(75deg);
      bottom: -5px;
      left: 10px;
      border-radius: 20px;
      box-shadow: -56px -76px black;
    }
  }
//   html
  .h {
    width: 5px;
    height: 23px;
    background: #000;
    left: 37px;
    bottom: 4px;
    border-radius: 20px;
    box-shadow: 11px 0px black;
    &::before {
      content: '';
      width: 5px;
      height: 12px;
      background: #000;
      left: 7px;
      bottom: 4px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
    }
  }
  .t {
    width: 5px;
    height: 23px;
    background: #000;
    left: 60px;
    bottom: 4px;
    border-radius: 20px;
    &::before {
      content: '';
      width: 5px;
      height: 15px;
      background: #000;
      left: 0px;
      bottom: 14px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
    }
  }
  .m {
    width: 5px;
    height: 23px;
    background: #000;
    left: 72px;
    bottom: 4px;
    border-radius: 20px;
    box-shadow: 14px 0px black;
    &::before {
      content: '';
      width: 5px;
      height: 13px;
      background: #000;
      left: 4px;
      bottom: 11px;
      border-radius: 20px;
      transform: rotate(135deg);
      position: absolute;
    }
    &::after {
      content: '';
      width: 5px;
      height: 13px;
      background: #000;
      left: 10px;
      bottom: 11px;
      border-radius: 20px;
      transform: rotate(-135deg);
      position: absolute;
    }
  }
  .l {
    width: 5px;
    height: 23px;
    background: #000;
    left: 95px;
    bottom: 4px;
    border-radius: 20px;
    &::before {
      content: '';
      width: 5px;
      height: 15px;
      background: #000;
      left: 5px;
      bottom: -5px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
    }
  }
//   plus
  .plus {
    width: 5px;
    height: 23px;
    background: #000;
    left: 70px;
    bottom: -30px;
    border-radius: 20px;
    &::before {
      content: '';
      width: 5px;
      height: 20px;
      background: #000;
      left: 0px;
      bottom: 2px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
    }
  }
//   css
  .c {
    width: 5px;
    height: 20px;
    background: #000;
    left: 39px;
    bottom: -64px;
    border-radius: 20px;
    &::before {
      content: '';
      width: 5px;
      height: 18px;
      background: #000;
      left: 7px;
      top: -7px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
      box-shadow: 20px 0px black;
    }
  }
  .s {
    width: 5px;
    height: 11px;
    background: #000;
    left: 61px;
    bottom: -55px;
    border-radius: 20px;
    box-shadow: 14px 11px black;
    &::before {
      content: '';
      width: 5px;
      height: 18px;
      background: #000;
      left: 7px;
      top: -7px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
      box-shadow: 10px 0px #000, 20px 0px black;
    }
    &.nd {
      left: 83px;
    }
  }
//   only
  .o {
    width: 5px;
    height: 25px;
    background: #000;
    left: 29px;
    bottom: -103px;
    border-radius: 20px;
    box-shadow: 15px 0 #000;
    &::before {
      content: '';
      width: 5px;
      height: 18px;
      background: #000;
      left: 7px;
      top: -7px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
      box-shadow: 20px 0px black;
    }
  }
  .n {
    width: 5px;
    height: 25px;
    background: #000;
    left: 55px;
    bottom: -103px;
    border-radius: 20px;
    box-shadow: 15px 0 #000;
    &::before {
      content: '';
      width: 5px;
      height: 27px;
      background: #000;
      left: 8px;
      bottom: -1px;
      border-radius: 20px;
      transform: rotate(143deg);
      position: absolute;
    }
  }
  .ll {
    width: 5px;
    height: 23px;
    background: #000;
    left: 80px;
    bottom: -102px;
    border-radius: 20px;
    &::before {
      content: '';
      width: 5px;
      height: 15px;
      background: #000;
      left: 5px;
      bottom: -5px;
      border-radius: 20px;
      transform: rotate(90deg);
      position: absolute;
    }
  }
  .y {
    width: 5px;
    height: 15px;
    background: #000;
    left: 102px;
    bottom: -102px;
    border-radius: 20px; 
    &::before {
      content: '';
      width: 5px;
      height: 13px;
      background: #000;
      left: -5px;
      bottom: 11px;
      border-radius: 20px;
      transform: rotate(135deg);
      position: absolute;
    }
    &::after {
      content: '';
      width: 5px;
      height: 13px;
      background: #000;
      left: 5px;
      bottom: 11px;
      border-radius: 20px;
      transform: rotate(-135deg);
      position: absolute;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console