cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="container">
  <div class="head">
    <div class="hairs">
      <div class="hair"></div>
    </div>
    <div class="face">
      <div class="eye-circle"></div>
      <div class="eye-circle right"></div>
      <div class="eye-circle two"></div>
      <div class="eye-circle two right"></div>
      <div class="eye-outer-circle-left">
        <div class="eye-inner-circle"></div>
      </div>
      <div class="eye-outer-circle-right">
          <div class="eye-inner-circle"></div>
      </div>
      <div class="mouth"></div>
    </div>
  </div>
  <div class="body">
    <div class="fin right"></div>
    <div class="fin right two"></div>
    <div class="fin left"></div>
    <div class="fin left two"></div>
    <div class="tail"></div>
    <div class="tail two"></div>
  </div>
</div>
            
          
!
            
              $body-color : #125bf8;
$background-blue: rgba(115, 153, 177, 0.33);
$darker-brown: #795548;

body {
  background: $background-blue;
}

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

.head, 
.body {
  position: absolute;
  top: 30px;
  width: 229px;
  height: 289px;
  border-radius: 50%;
}

.body {
  background: #3155a5;
  left: 10px;
  z-index: -1;
  
  .tail {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 100px 130px 100px 0;
    border-color: transparent #3155a5 transparent transparent;
    position: absolute;
    top: -20px;
    left: 193px;
    border-bottom-right-radius: 50%;
    border-top-right-radius: 50%;
    transform: rotate(-25deg);
    
    &.two {
      left: 205px;
      top: -37px;
      border-color: transparent #f0f436 transparent transparent;
      z-index: -1;
      border-width: 113px 130px 113px 0;
    }
  }
  
  .fin {
    width: 0;
    height: 0;
    position: absolute;
    top: 200px;
    border-style: solid;
    border-width: 30px 50px 30px 0;
    border-color: transparent #3155a5 transparent transparent;
    border-bottom-right-radius: 30px;
    border-top-right-radius: 30px;
  
    &.left {
      left: -30px;
      transform: rotate(180deg);
      &.two {
        left: -36px;
        border-width: 36px 50px 35px 0;
        border-bottom-right-radius: 50px;
        border-top-right-radius: 50px;
        top: 194px;
        border-color: transparent #f0f436 transparent transparent;
        transform: rotate(180deg);
        z-index: -1;
      }
    }  
    &.right {
      left: 197px;   
      &.two {
        left: 203px;
        border-width: 36px 50px 35px 0;
        border-bottom-right-radius: 50px;
        border-top-right-radius: 50px;
        top: 194px;
        border-color: transparent #f0f436 transparent transparent;
        z-index: -1;
      }
    }
  }
}

.head {
  background: $body-color;
  .face{
    //Copied mouth from - https://codepen.io/hjdesigner/pen/yggvzE 
    .mouth{
      width: 80px;
      height: 30px;
      position: absolute;
      z-index: 4;
      background-color: #000;
      top: 210px;
      left: 77px;
      border-radius: 0px 0 55px 55px;
      &:before{
        content: "";
        width: 41px;
        height: 7px;
        position: absolute;
        z-index: 4;
        background-color: #FFF;
        top: 0px;
        left: 20px;
        border-radius: 0px 0 85px 85px;
      }
      &:after{
        content: "";
        width: 33px;
        height: 7px;
        position: absolute;
        z-index: 4;
        background-color: #e15728;
        bottom: 0px;
        left: 25px;
        border-radius: 50%;
      }
    }
    
    .eye-circle {
      background: #3155a5;
      border-radius: 50%;
      height: 120px;
      width: 120px;
      position: absolute;
      top: 25px;
      &.right {
        left: 125px;
      }
      &.two {
        background: white;
        width: 110px;
        height: 110px;
        top: 28px;
        left: -5px;
        &.right {
          left: 140px;
        }
      }
    }
    .eye-outer-circle-left,
    .eye-outer-circle-right {
      background: black;
      border-radius: 50%;
      height: 75px;
      width: 75px;
      position: absolute;
      left: 30px;
      top: 50px; 
      animation-name: blink;
      animation-duration: 4s;
      animation-iteration-count: infinite; 
      transform-origin: 50%;
      z-index: 1;
    }

    .eye-outer-circle-right {
      left: 140px;
    }

    .eye-inner-circle {
      position: relative;
      background: white;
      border-radius: 50%;
      height: 15px;
      width: 15px;
      margin: 6px 0px 0px 10px;
    }
  }
}

.hair {
  position: absolute;
  top: -5px;
  left: 108px;
  background: $body-color;
  width: 30px;
  height: 40px;
  border-radius: 100% 0 100% 100%;
  transform: rotate(-20deg);
}

@-webkit-keyframes blink { 
  0% { -webkit-transform: scaleX(1) scaleY(1); } 
  60% { -webkit-transform: scaleX(1) scaleY(1); } 
  61% { -webkit-transform: scaleX(1.3) scaleY(0.3);} 
  66% { -webkit-transform: scaleX(1) scaleY(1); } 
  100% { -webkit-transform: scaleX(1) scaleY(1); }
}

@keyframes blinker {  
  40% { opacity: 0; }
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console