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.

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="child">
    <div class="head"></div>
    <div class="afro1"></div>
    <div class="afro2"></div>
    <div class="afro3"></div>
    <div class="afro4"></div>
    <div class="earleft"></div>
    <div class="earright"></div>
    <div class="glassesleft"></div>
    <div class="glassesmiddle"></div>
    <div class="eyeballleft">
      <div class="eyeballleft_shine"></div>
    </div>
    <div class="glassesright"></div>
    <div class="eyeballright">
      <div class="eyeballleft_shine"></div>
    </div>
    <div class="nose"></div>
    <div class="half-circle">
      <div class="border-circle left-circle"></div>
      <div class="border-circle right-circle"></div>
    </div>
    <div class="neck"></div>
    <div class="collar"></div>
    <div class="belly"></div>
    <div class="leftarm"></div>
    <div class="leftforearm"></div>
    <div class="rightarm"></div>
    <div class="rightforearm"></div>
    <div class="leftthumb"></div>
    <div class="lefthand"></div>
    <div class="rightthumb"></div>
    <div class="righthand"></div>
    <div class="controller">
      <div class="lights"></div>
      <div class="leftcontrol"></div>
      <div class="rightcontrol"></div>
      <div class="antenna"></div>
    </div>
    <div class="legs"></div>
    <div class="leftboot">
      <div class="leftbootsole"></div>
    </div>
    <div class="rightboot">
      <div class="rightbootsole"></div>
    </div>
  </div>
  <div class="drone">
    <div class="wings"></div>
    <div class="leftspinner"></div>
    <div class="camera"></div>
    <div class="rightspinner"></div>
  </div>
  <div class="suitcase"></div>
  <div class="backpack">
    <div class="pockets"></div>
  </div>
  <div class="ground"></div>
</div>
              
            
!

CSS

              
                @background: #dfd356;
@background-gradient: linear-gradient(to right top, #dfd356, #e5db6d, #ebe284, #f1ea99, #f7f1af);

* {
  margin: 0 auto;
  -webkit-user-select: none;
}

.centered() {
  margin: auto;
  position: absolute;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
}

.container {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: @background-gradient;
  overflow: hidden;
}

.child{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 250px;
  width: 300px;
  margin-top: 50px;
  z-index: 1;
  
  .head{
    .centered();
    top: -75px;
    height: 115px;
    width: 100px;
    background-color: #fbe0bf;
    border-radius: 5rem 5rem 4.5rem 4.5rem;
    z-index: 10;
  }
  
  .afro1{
    .centered();
    height: 55px;
    width: 55px;
    top: -120px;
    left: -100px;
    background-color: #3e0000;
    border-radius: 50%;
  }
  
  .afro2{
    .centered();
    height: 40px;
    width: 40px;
    top: -180px;
    left: -65px;
    background-color: #3e0000;
    border-radius: 50%;
    z-index: 10;
  }
  
  .afro3{
    .centered();
    height: 75px;
    width: 75px;
    top: -200px;
    left: 20px;
    background-color: #3e0000;
    border-radius: 50%;
    z-index: 10;
  }
  
  .afro4{
    .centered();
    height: 58px;
    width: 58px;
    top: -120px;
    left: 95px;
    background-color: #3e0000;
    border-radius: 50%;
  }
  
  .earleft{
    .centered();
    height: 25px;
    width: 25px;
    top: -60px;
    left: -105px;
    background-color: pink;
    border-radius: 50%;
    z-index: 10;
  }
  
  .earleft::before{
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ff748c;
    opacity: 0.8;
  }
  
  .earright{
    .centered();
    height: 25px;
    width: 25px;
    top: -60px;
    left: 105px;
    background-color: pink;
    border-radius: 50%;
  }
  
  .earright::before{
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ff748c;
    opacity: 0.8;
  }
  
  .glassesleft{
    .centered();
    height: 50px;
    width: 50px;
    top: -80px;
    left: -55px;
    background-color: #ff3838;
    border-radius: 50%;
    z-index: 10;
  }
  
  .glassesleft::before{
    content: "";
    position: absolute;
    height: 35px;
    width: 35px;
    top: 7.5px;
    left: 7.5px;
    background-color: @background;
    border-radius: 50%;
  }
  
  .glassesmiddle{
    .centered();
    height: 10px;
    width: 20px;
    top: -75px;
    left: 5px;
    background-color: #ff3838;
    border-radius: 1rem;
    z-index: 10;
  }
  
  .glassesright{
    .centered();
    height: 50px;
    width: 50px;
    top: -80px;
    left: 55px;
    background-color: #ff3838;
    border-radius: 50%;
    z-index: 10;
  }
  
  .glassesright::before{
    content: "";
    position: absolute;
    height: 35px;
    width: 35px;
    top: 7.5px;
    left: 7.5px;
    background-color: @background;
    border-radius: 50%;
    z-index: 1;
  }
  
  .eyeballleft{
    .centered();
    height: 25px;
    width: 25px;
    top: -80px;
    left: -55px;
    background-color: white;
    border-radius: 50%;
    z-index: 10;
  }
  
  .eyeballright{
    .centered();
    height: 25px;
    width: 25px;
    top: -80px;
    left: 55px;
    background-color: white;
    border-radius: 50%;
    z-index: 10;
  }
  
  .eyeballleft_shine{
    position: absolute;
    height: 15px;
    width: 25px;
    left: 2px;
    background-color: black;
    border-radius: 5rem 5rem 0 0;
    animation: eyeballmove 8s infinite alternate linear;
  }
  
  .eyeballleft_shine::before{
    content: "";
    position: absolute;
    height: 6px;
    width: 6px;
    background-color: white;
    border-radius: 50%;
    left: 15px;
    top: 5px;
  }
  
  .eyeballleft_shine::after{
    content: "";
    position: absolute;
    height: 4px;
    width: 4px;
    background-color: white;
    border-radius: 50%;
    left: 7px;
    top: 3px;
  }
  
  .eyeballright_shine{
    position: absolute;
    left: 2px;
    height: 15px;
    width: 25px;
    background-color: black;
    border-radius: 5rem 5rem 0 0;
    transform: rotate(20deg);
  }
  
  .eyeballright_shine::before{
    content: "";
    position: absolute;
    height: 6px;
    width: 6px;
    background-color: white;
    border-radius: 50%;
    left: 15px;
    top: 5px;
  }
  
  .eyeballright_shine::after{
    content: "";
    position: absolute;
    height: 4px;
    width: 4px;
    background-color: white;
    border-radius: 50%;
    left: 7px;
    top: 3px;
  }
  
   .nose{
    .centered();
    height: 5px;
    width: 5px;
    top: -25px;
    left: -7.5px;
    background-color: #ff748c;
    border-radius: 50%;
    z-index: 10;
  }
  
  .nose::after{
    content: "";
    .centered();
    height: 5px;
    width: 5px;
    left: 10px;
    background-color: #ff748c;
    border-radius: 50%;
    z-index: 2;
  }
  
  .half-circle {
    position: absolute;
    height:165px;
    width: 70px;
    top: 25px;
    left: 22.5px;
    border-radius: 150px 0 0 150px;
    border-top: 20px solid #ff748c;
    border-left: 20px solid #ff748c;
    border-bottom: 20px solid #ff748c;
    transform: translate(100px) rotate(-140deg) scale(0.08);
    z-index: 10;
    
}
  .border-circle {
    background-color: #ff748c;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    position: absolute;
  }
  .left-circle {
    right: -8px;
    top: -20px;
  }
  .right-circle {
    bottom: -20px;
    right: -8px;
  }
  
  .neck{
    .centered();
    height: 70px;
    width: 50px;
    top: 20px;
    left: 10px;
    border-radius: 3rem;
    background-color: #fbc2bf;
    z-index: 0;
    transform: rotate(-25deg);
    z-index: 9;
  }
  
  .collar{
    .centered();
    height: 65px;
    width: 65px;
    top: 45px;
    left: 17.5px;
    background-color: #a7c7da;
    border-radius: 50%;
    z-index: 8;
  }
  
  .belly{
    .centered();
    height: 100px;
    width: 100px;
    top: 90px;
    left: 17.5px;
    background-color: #5090b6;
    border-radius: 50%;
    z-index: 6;
  }
  
  .leftarm{
    .centered();
    width: 100px;
    height: 30px;
    left: -130px;
    top: 92px;
    border-radius: 2rem;
    background-color: #95bcd3;
    transform: rotate(-38deg);
    z-index: 5;
  }
  
  .leftforearm{
    .centered();
    width: 70px;
    height: 30px;
    left: -145px;
    top: 135px;
    border-radius: 2rem;
    background-color: #b1cdde;
    z-index: 6;
  }
  
  .rightarm{
    .centered();
    width: 96px;
    height: 30px;
    left: 150px;
    top: 80px;
    border-radius: 2rem;
    background-color: #95bcd3;
    transform: rotate(42deg);
    z-index: 5;
  }
  
  .rightforearm{
    .centered();
    width: 60px;
    height: 30px;
    left: 165px;
    top: 130px;
    border-radius: 2rem;
    background-color: #b1cdde;
    transform: rotate(-10deg);
    z-index: 7;
  }
  
  .lefthand{
    .centered();
    height: 45px;
    width: 48px;
    background-color: #fbe0bf;
    z-index: 10;
    top: 130px;
    left: -80px;
    border-radius: 50%;
  }
  
  .leftthumb{
    position: absolute;
    height: 40px;
    width: 16px;
    top: 148px;
    left: 102px;
    z-index: 7;
    border-radius: 2rem;
    background-color: pink;
    animation: leftthumbmove 1.5s infinite alternate;
  }
  
  .righthand{
    .centered();
    height: 45px;
    width: 48px;
    background-color: #fbe0bf;
    z-index: 10;
    top: 130px;
    left: 115px;
    border-radius: 50%;
  }
  
  .rightthumb{
    position: absolute;
    height: 40px;
    width: 16px;
    top: 148px;
    left: 200px;
    z-index: 7;
    border-radius: 2rem;
    background-color: pink;
    animation: rightthumbmove 1.5s infinite alternate;
    animation-delay: 0.5s;
  }
  
  .legs{
    .centered();
    height: 65px;
    width: 250px;
    top: 200px;
    left: 10px;
    background-color: #830263;
    border-radius: 10%;
    z-index: 5;
  }
  
  .leftboot{
    .centered();
    height: 75px;
    width: 45px;
    top: 195px;
    left: -225px;
    background-color: #CB3524;
    z-index: 5;
    border-radius: 1.2rem;
  }
  
  .leftboot::before{
    position: absolute;
    content: "";
    top: 45px;
    left: 30px;
    height: 20px;
    width: 20px;
    background-color: @background;
    border-radius: 1.2rem;
    z-index: 7;
  }
  
  .leftboot::after{
    position: absolute;
    content: "";
    top: 35px;
    left: 20px;
    height: 40px;
    width: 40px;
    background-color: #CB3524;
    z-index: 6;
    border-radius: 1.2rem;
  }
  
  .leftbootsole{
    position: absolute;
    height: 75px;
    width: 40px;
    left: -12.5px;
    background-color: #f02c67;
    z-index: 7;
    border-radius: 1.2rem;
  }
  
  .leftbootsole::after{
    position: absolute;
    content: "";
    height: 75px;
    width: 40px;
    left: -10px;
    background-color: #000;
    z-index: 7;
    border-radius: 1.2rem;
  }
  
  .rightboot{
    .centered();
    height: 75px;
    width: 40px;
    top: 195px;
    left: 255px;
    background-color: #CB3524;
    z-index: 5;
    border-radius: 1.2rem;
  }
  
  .rightboot::before{
    position: absolute;
    content: "";
    top: 45px;
    left: -10px;
    height: 20px;
    width: 20px;
    background-color: @background;
    border-radius: 1.2rem;
    z-index: 7;
  }
  
  .rightboot::after{
    position: absolute;
    content: "";
    top: 35px;
    left: -20px;
    height: 40px;
    width: 40px;
    background-color: #CB3524;
    z-index: 5;
    border-radius: 1.2rem;
  }
  
  .rightbootsole{
    position: absolute;
    height: 75px;
    width: 40px;
    left: 12.5px;
    background-color: #f02c67;
    z-index: 7;
    border-radius: 1.2rem;
  }
  
  .rightbootsole::after{
    position: absolute;
    content: "";
    height: 75px;
    width: 40px;
    left: 10px;
    background-color: #000;
    z-index: 7;
    border-radius: 1.2rem;
  }
  
  .controller{
    .centered();
    height: 40px;
    width: 100px;
    background-color: black;
    z-index: 9;
    top: 134px;
    left: 20px;
    border-radius: 1rem;
    
    .lights{
      .centered();
      background-color: #8aff77;
      height: 4px;
      width: 4px;
      top: 12px;
      left: -24px;
      border-radius: 50%;
      animation: lightup 2.5s infinite alternate;
    }
    
    .lights::before{
      position: absolute;
      content: "";
      background-color: #8aff77;
      height: 4px;
      width: 4px;
      left: 10px;
      border-radius: 50%;
    }
    
    .lights::after{
      position: absolute;
      content: "";
      background-color: #8aff77;
      height: 4px;
      width: 4px;
      left: 20px;
      border-radius: 50%;
    }
    
    .leftcontrol{
      .centered();
      height: 30px;
      width: 10px;
      background-color: black;
      z-index: 7;
      top: -40px;
      left: -46px;
      border-radius: 1rem;
      transform: rotate(-30deg);
    }
    
    .leftcontrol::before{
      position: absolute;
      content: "";
      height: 24px;
      width: 10px;
      background-color: black;
      z-index: 7;
      top: -10px;
      left: 0px;
      border-radius: 1rem;
      transform: rotate(120deg);
      z-index: 7;
    }
    
    .rightcontrol{
      .centered();
      height: 30px;
      width: 10px;
      background-color: black;
      z-index: 7;
      top: -40px;
      left: 46px;
      border-radius: 1rem;
      transform: rotate(30deg);
    }
    
    .rightcontrol::before{
      position: absolute;
      content: "";
      height: 24px;
      width: 10px;
      background-color: black;
      z-index: 7;
      top: -10px;
      left: 0px;
      border-radius: 1rem;
      transform: rotate(-120deg);
      z-index: 7;
    }
    
    .antenna{
      .centered();
      height: 40px;
      left: -24px;
      top: -50px;
      width: 3px;
      background-color: black;
    }
    
    .antenna::after{
      position: absolute;
      content: "";
      height: 40px;
      left: -3.5px;
      top: -1px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background-color: black;
    }
    
  }
  
  .controller::before{
    position: absolute;
    content: "";
    height: 20px;
    width: 5px;
    background-color: black;
    z-index: 9;
    top: -4px;
    left: 44px;
    border-radius: 1rem;
  }
  
  .controller::after{
    position: absolute;
    content: "";
    height: 20px;
    width: 5px;
    background-color: black;
    z-index: 9;
    top: -4px;
    left: 52px;
    border-radius: 1rem;
  } 
}

.drone{
  position: absolute;
  top: 10%;
  margin-left: -50px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: black;
  animation: lefttoright 8s infinite alternate linear;
  z-index: 99;
  
  .camera{
    position: absolute;
    height: 30px;
    width: 30px;
    background-color: black;
    border-radius: 50%;
    left: 25px;
    top: 10px;
    z-index: 5;
  }
  
  .camera::before{
    position: absolute;
    content: "";
    height: 10px;
    width: 150px;
    background-color: #ff3838;
    border-radius: 1rem;
    top: 30px;
    left: -60px;
    z-index: 5;
  }
  
  .camera::after{
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    background-color: @background;
    border-radius: 50%;
    top: 7.5px;
    left: 7.5px;
    z-index: 5;
  }
  
  .wings{
    position: absolute;
    width: 200px;
    height: 20px;
    background-color: black;
    border-radius: 1rem;
    left: -60px;
    top: 40px;
  }
  
  .wings::before{
    position: absolute;
    content: "";
    width: 10px;
    height: 50px;
    background-color: black;
    border-radius: 1rem;
    left: 50px;
    top: 10px;
    transform: rotate(30deg);
  }
  
  .wings::after{
    position: absolute;
    content: "";
    width: 10px;
    height: 50px;
    background-color: black;
    border-radius: 1rem;
    left: 144px;
    top: 10px;
    transform: rotate(-30deg);
  }
  
  .leftspinner{
    position: absolute;
    left: -35px;
    top: 20px;
    height: 20px;
    width: 15px;
    background-color: black;
    border-radius: 1rem 1rem 0 0;
  }
  
  .leftspinner::before{
    position: absolute;
    content: "";
    top: -10px;
    left: 4px;
    height: 20px;
    width: 6px;
    background-color: black;
    border-radius: 1rem 1rem 0 0;
  }
  
  .leftspinner::after{
    position: absolute;
    content: "";
    top: -7.5px;
    left: -22.5px;
    height: 4px;
    width: 60px;
    background-color: black;
    border-radius: 3rem;
    animation: spinwing 1s infinite linear;
  }
  
  .rightspinner{
    position: absolute;
    left: 100px;
    top: 20px;
    height: 20px;
    width: 15px;
    background-color: black;
    border-radius: 1rem 1rem 0 0;
  }
  
  .rightspinner::before{
    position: absolute;
    content: "";
    top: -10px;
    left: 4px;
    height: 20px;
    width: 6px;
    background-color: black;
    border-radius: 1rem 1rem 0 0;
  }
  
  .rightspinner::after{
    position: absolute;
    content: "";
    top: -7.5px;
    left: -22.5px;
    height: 4px;
    width: 60px;
    background-color: black;
    border-radius: 3rem;
    animation: spinwing 1s infinite linear;
  }
  
}

.drone::before{
  position: absolute;
  content: "";
  height:40px;
  width:80px;
  border-radius: 90px 90px 0 0;
  background: #ff3838;
}

.drone::after{
  position: absolute;
  content: "";
  top: -6px;
  left: 10px;
  height: 60px;
  width: 60px;
  background-color: #ff3838;
  border-radius: 50%;
}

.ground{
  .centered();
  width: 450px;
  height: 38px;
  background-color: #aca023;
  top: 375px;
  border-radius: 2rem;
  opacity: 0.3;
  z-index: 0;
}

.backpack{
  .centered();
  height: 125px;
  width: 100px;
  background-color: #ff3838;
  top: 220px;
  left: 275px;
  border-radius: 1.5rem 1.5rem 1rem 1rem;
  opacity: 0.9;
  
  .pockets{
    position: absolute;
    top: 25px;
    left: 25px;
    height: 25px;
    width: 50px;
    background-color: @background;
    border-radius: 0.5rem;
  }
  
  .pockets::after{
    position: absolute;
    content: "";
    top: 50px;
    left: -30px;
    height: 10px;
    width: 110px;
    background-color: @background;
    border-radius: 1rem;
  }
}

.backpack::after{
  position: absolute;
  content: "";
  width: 40px;
  height: 40px;
  top: -25px;
  left: 20px;
  border: 10px solid #ff3838;
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
  transform: rotate(-45deg);
}

.suitcase{
  .centered();
  width: 150px;
  height: 60px;
  top: 280px;
  left: 275px;
  background-color: #661b28;
  border-radius: 1rem;
  opacity: 0.9;
}

.suitcase::after{
  position: absolute;
  content: "";
  width: 80px;
  height: 8px;
  top: 25px;
  left: 75px;
  background-color: #aca023;
  border-radius: 1rem;
}


@keyframes spinwing{
  to{transform: rotateY(0deg);}
  from{transform: rotateY(720deg);}
}

@keyframes lefttoright{
  to{left: 30%;}
  from{left: 70%;}
}

@keyframes eyeballmove{
  to{ transform: rotate(-20deg) translate(-4px, -2px); }
  from{ transform: rotate(20deg) translate(0); }
}

@keyframes leftthumbmove{
  to{transform: rotate(50deg);}
  from{transform: rotate(25deg);}
}

@keyframes rightthumbmove{
  to{transform: rotate(-50deg);}
  from{transform: rotate(-25deg);}
}

@keyframes lightup{
  to{opactity: 1;}
  from{opacity: 0.5;}
}
              
            
!

JS

              
                // Thanks for visiting my codepen! If you enjoy make sure to ♥ this pen
// Inspired by this dribbble illustration by @olamide bakare - https://dribbble.com/shots/6547940-Practicals
              
            
!
999px

Console