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

              
                .figure
  .mj
    .head
      .nose
      .hair
        .ponytail
        .frontpony
    .body
      .jacket
        .hand
    .leg
      .foot
    .leg.lft
      .foot
  .error-no  
    span 4
    .moon
    span 4
              
            
!

CSS

              
                *, *:after,*:before{
  box-sizing: border-box;
}

html{
  background: #23508a;
background: radial-gradient(ellipse at center,  #23508a 0%,#1b3b62 50%,#1a365b 100%);
  font-family: arial;
  min-width: 400px;
}

body{
  width: 100%;
  height: 100vh;
  margin: 0;
background: radial-gradient(ellipse at center, rgba(115,133,154,1) 1%,rgba(114,132,152,0) 2%,rgba(0,0,0,0) 100%),
  radial-gradient(ellipse at center, rgba(115,133,154,1) 1%,rgba(114,132,152,0) 2%,rgba(0,0,0,0) 100%),
  radial-gradient(ellipse at center, rgba(115,133,154,0.5) 1%,rgba(114,132,152,0) 2%,rgba(0,0,0,0) 100%)
  
  ;
  background-size: 250px 250px , 100px 100px , 60px 60px;
  background-repeat: repeat;

}

$txc : #68e3e9;
$bdy: #feead6;
$hr: #151515;

.figure{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -65%);
}

.error-no{
  font-size: 200px;
  font-weight: bold;
  display: flex;
  align-items:center;
  justify-content: center;
  color: $txc;
  text-shadow: -2px 4px 2px rgba(#000,0.5);
}

.moon{
  width: 150px;
  height:150px;
  border-radius:50%;  
  background: #fff;
  position: relative;
  display: inline-block;
  z-index:10;
  overflow: hidden;
  box-shadow: -20px 0 20px #e9e9e9 inset;
  border: 1px solid $txc;
  
  &:after{
    content: '';
    position: absolute;
    left: 75px;
    top: 70%;
    width: 20px;
    height: 20px;
    border-radius:50%;
    color: #e9e9e9;
    background: currentcolor;
    animation: 5s spin linear infinite;
    box-shadow: -30px -50px 0 20px,
                50px -30px 0 -8px ,
                50px -90px 0 2px , 
                100px -90px 0 0px, 
                100px -40px 0 25px,
                150px -15px 0 0px, 
                240px 15px 0 4px,
                230px -80px 0 2px,  
                200px -20px 0 16px,
                350px  0 0,
                320px -50px 0 20px,
                400px -30px 0 -8px,
                400px -90px 0 2px;
  }
}


.mj{
  position: relative;
  margin: auto;
  z-index: 30;
  width: 60px;
  transform: scale(0.6) translatey(70%);
  // height: 200px;
    
  .head{
    width: 30px;
    height: 35px;
    background: $bdy;
    position: relative;
    border-radius: 0 0 8px 0;
    transform: rotate(20deg);
    left: 10px;
    top: 5px;
    z-index: 5;
    &:before{
      content: '';
      background: #000;
      width: 35px;
      height: 30px;
      position: absolute;
      left: -2px;
      bottom: 100%;
    }
    &:after{
      content: '';
      height: 3px;
      width: 60px;
      background: #000;
      position: absolute;
      left: 50%;
      transform:translatex(-50%);
      bottom: 100%;
    }
    .nose{
      position: absolute;
      left: 100%;
      top: 10px;
      border-width: 8px 0 0 4px ;
      border-style: solid;
      border-color: transparent $bdy;
    }
  }
  .hair{
    background: $hr;
    width: 12px;
    height: 20px;
    position: relative;
    left: -2px;
    border-radius: 0 0 6px 0;
    
    .ponytail{
      position: absolute;
      background: $hr;
      width: 14px;
      height: 30px;
      border-radius: 50%;
      transform: rotate(20deg);
      left: -60%;
      top: 90%;
      transform-origin: 100% 0%;
      animation: ponytail 1s infinite alternate;
      &:after{
        content: '';
        background: $hr;
        width: 9px;
        height: 14px;
        position: absolute;
        left: 10%;
        transform: rotate(21deg);
        top: 70%;
        border-radius:10px 0 50%;
      }
    }
    .frontpony{
      position: absolute;
      width: 8px;
      height: 12px;
      border-left: 3px solid;
      border-bottom: 2px solid;
      left: 22px;
      top: 0px;
      transform: skew(35deg , 0) rotate(35deg);
      border-radius: 0 0 0 43%;
      color: $hr;
      &:after{
        content: '';
        width: 10px;
        height: 10px;
        position: absolute;
        border-right: 1px solid;
        border-bottom: 1px solid;
        left: -4px;
        top: 13px;
        transform: skew(0deg, -47deg) rotate(-28deg);
        border-radius: 0 0 7px 0;
      }
    }
  }
}

.body{
  width: 35px;
  background: $bdy;
  position: relative;
  &:after{
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    border-style: solid;
    border-width: 5px 8px 15px 0px;
    border-color:  transparent $bdy transparent transparent;
  }
  .jacket{
   background: #000;
    height: 70px;
    position: relative;
    &:before{
      content: '';
      position: absolute;
      top: 50px;
      left: -10px;
      width: 45px;
      height: 40px;
      background: #000;
      border-radius: 0 50px  50px 50px;
      transform: rotate(25deg);
      z-index: 5;
      animation: 1s jacket infinite alternate;
    }
    &:after{
      content: '';
      position: absolute;
      left: 95%;
      width: 6px;
      height: 115%;
      top: 0;
      background: #000;
      z-index: -5;
      border-radius: 0 0 100px 0;
    }
  }
}

.hand{
  width: 15px;
  height: 40px;
  background: $hr;
  top: 10px;
  left: -5px;
  margin:auto;
  position: relative;
  border-radius: 10px 10px 0 0;
  z-index: 10;
  transform: rotate(15deg);
  &:after{
    content: '';
    width: 100%;
    position: absolute;
    top: 38px;
    left: -1px;
    background: $hr;
    height: 40px;
    transform:rotate(-35deg);
    transform-origin: 0 0 0;
    border-radius:0 0 10px 10px;
    z-index: 5;
    animation: forArm 1s infinite alternate;
  } 
  &:before{
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: $bdy;
    top: 54px;
    left: 18px;
    animation: pam 1s infinite alternate;
  }
}

.leg{
  width: 22px;
  background: #000;
  height: 50px;
  margin-left: 10px;
  margin-bottom: 45px;
  position: relative;
  transform-origin: 100% 0%;
  animation: leg 1s infinite alternate;
  .foot { 
    position:absolute;
    top: 50px;
    left: 0;
    width: 22px;
    height: 50px;
    background: #000;
    transform: rotate(0deg);
    transform-origin: 100% 0%;
    border-bottom: 6px solid #fff;
    border-radius: 0 0 2px 2px;
    animation: foot 1s infinite alternate;
    &:before{
      content: '';
      position:absolute;
      top: 50px;
      left: -1px;
      height: 13px;
      width: 42px;
      background: #000;
      border-radius: 0 10px 10px;
    }
  }
  &.lft{
    position: absolute;
    bottom: -50px;
    animation-direction : alternate-reverse ;
    .foot{
       animation-direction : alternate-reverse ;
    }
  }
}

@keyframes spin{
  0% {  left: 75px;}
  100% {  left: -275px}
}

@keyframes foot{
  0% {  transform: rotate(0deg);}
  100% {  transform: rotate(20deg);}
}

@keyframes leg{
  0% {  transform: rotate(-10deg);}
  100% {  transform: rotate(10deg);}
}

@keyframes ponytail{
  100% {  transform: rotate(10deg);}
}
@keyframes jacket{
  100% {  transform: rotate(20deg);}
}
@keyframes forArm{
  100% {  transform: rotate(-30deg);}
}
@keyframes pam{
  0% {   transform: translate(0 , 0 )} 
  100% { transform: translate(-2px , 2px)}
}
              
            
!

JS

              
                
              
            
!
999px

Console