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="hero">
    <div class="hero-cape"></div>
    <div class="hero-head">
      H
      <div class="hero-chin">
        <div class="hero-nose">
          <div class="hero-nose-bottom">
          </div>
          <div class="hero-nose-left">
          </div>
        </div>
        <div class="hero-mouth">
        </div>
      </div>
      <div class="hero-eyes">      
        <div class="hashnode" style="--h-length: 22.5vmin">
        </div>      
        <div class="hashnode" style="--h-length: 22.5vmin">
        </div>
      </div>
    </div>
    <div class="hero-body">
      <div class="hero-chest">
        <div class="hashnode" style="--h-length: 12.5vmin">
        </div>
        <div class="hero-arm left-arm">
          <div class="hero-gloves left-glove">
            <div class="hero-hands left-hand">
            </div>
            <div class="hero-fingers left-fingers">
              <div class="hero-finger">
              </div>
              <div class="hero-finger">
              </div>
              <div class="hero-finger">
              </div>
            </div>
          </div>
        </div>
        <div class="hero-arm right-arm">
          <div class="hero-gloves right-glove">
            <div class="hero-hands right-hand">
            </div>
            <div class="hero-fingers right-fingers">
              <div class="hero-finger">
              </div>
              <div class="hero-finger">
              </div>
              <div class="hero-finger">
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="hero-legs">
        <div class="hero-belt">
        </div>
        <div class="hero-pants">
        </div>
        <div class="hero-leg left-leg">
        </div>
        <div class="hero-leg right-leg">
        </div>
        <div class="hero-boot left-boot">
        </div>
        <div class="hero-boot right-boot">
        </div> 
      </div>
    </div>
  </div>
</div> 

<a href="https://codepen.io/maxew33"
     class="signature"
     target="_blank">
    <div class="link">
      <span class="brace">
        {
      </span>
      <span class="before">
        <span class="before-text">
          &nbsp;by
        </span>
      </span>
      <span class="my-name">
        m
      </span>
      <span class="after">
        <span class="after-text">
          <span class="spin">axe</span>
          <span>w</span>
        </span>
      </span>
      <span class="brace">
        }
      </span>
    </div>
  </a>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Odor+Mean+Chey&display=swap');

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

:root{
  --h-blue: hsl(224, 100%, 58%);
  --main-color: hsl(224, 100%, 40%);
  --second-color: hsl(0, 70%, 45%);
  --cape: hsl(0, 50%, 25%);
  --skin:	hsl(21, 87%, 82%);
  --bg: #222;
  --panties: hsl(224, 100%, 40%);
}

body{
  height: 100vh;
  width: 100vw;
  background: var(--bg)
    radial-gradient(ellipse at top right, hsl(20deg, 50%, 80%, .15), hsl(0, 0%, 80%, 0) 50%);
  display: grid;
  place-content: center;
}

.container{
  position: relative;
  width: 100vmin;
  height: 100vmin;
}

.hero{
  position: absolute;
  left: 22.5vmin;
  top: 5vmin;
  height: 90vmin;
  width: 55vmin;
  display: flex;
  flex-direction: column;
}

.hero-head{
  position: relative;
  text-align: center;
  line-height: 20vmin;
  font-size: 15vmin;
  font-weight: bolder;
  color: #ddd;
  font-family: 'Odor Mean Chey', serif;
  width: 100%;
  height: 52.5%;
  border-radius: 12.5vmin 12.5vmin 17.5vmin 17.5vmin / 12.5vmin 12.5vmin 12.5vmin 12.5vmin ;
  background: var(--main-color);
  z-index: 10;
  
  .hero-eyes{
    position: absolute;
    top: 32.5%;
    left: 1.25%;
    width: 97.5%;
    height: 40%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
  }
  
  .hero-chin{
    position: absolute;
    bottom: 0;
    left: 1.25%;
    width: 97.5%;
    height: 47.5%;
    background: var(--skin);
    border-radius: 5vmin 5vmin 15vmin 15vmin / 2.5vmin 2.5vmin 12.5vmin 12.5vmin ;
    
    .hero-nose{
      position: absolute;
      height: 4vmin;
      width: 4vmin;
      top: 22.5%;
      left: calc(50% - 2vmin);   
      
      &>div{
        position: absolute;
        bottom: 0;
        width: 0;
        height: 0;
        border-style: solid;
      }
      
      .hero-nose-bottom{
        border-width: 0 2vmin 1.5vmin 2vmin;
        border-color: transparent transparent hsl(21, 87%, 78%) transparent;
      }
      
      .hero-nose-left{
        border-width: 0 2vmin 1vmin 2vmin;
        border-color: transparent transparent hsl(21, 87%, 68%) transparent;
        transform: translate(-.5vmin, -1vmin) rotate(120deg) ;
      }  
    }
    
    .hero-mouth{
      position: absolute;
      width: 12.5%;
      height: 12.5%;
      background: #eee;
      top: 70%;
      left: 50%;
      transform: translate(-50%, -50%);
      border-radius: 50% 50% 50% 50% / 0% 0% 100% 100% ;
    }
  }
}

.hero-body{
  width: 100%;
  height: 47.5%;
  display: flex;
  flex-direction: column;
}

.hero-chest{
  position: relative;
  width: 50%;
  height: 45%;
  background: var(--main-color);
  left: 25%;
  border-radius: 0 0 7.5vmin 7.5vmin / 0 0 12.5vmin 12.5vmin;
  display: flex;
  justify-content: center;
  align-items: center;

  .hero-arm{
    position: absolute;
    top: 0;
    width: 25%;
    height: 90%;
    background: var(--main-color);
  }
  .left-arm{
    left: 0;
    transform: rotate(45deg);
    transform-origin: top;
  }
  
  .right-arm{
    right: 0;
    transform: rotate(-45deg);
    transform-origin: top;
  }
  
  .hero-gloves{
      position: absolute;
      bottom: -27.5%;
      width: 100%;
      height: 50%;
      background: var(--main-color);      
    }
    
    .left-glove{
      right: -20%;
      border-radius: 1.5vmin 0;
      transform: rotate(-50deg);
      
    }
    .right-glove{
      left: -20%;
      border-radius: 0 1.5vmin;
      transform: rotate(50deg);      
    }
  
  .hero-hands{
    position: absolute;
    bottom: -25%;
    left: -5%;
    width: 110%;
    height: 60%;
    background: var(--second-color);
    border-radius: 2.5vmin 2.5vmin 7.5vmin 7.5vmin / 1.5vmin 1.5vmin 12.5vmin 12.5vmin;
    
    &::after{
      content:'';
      position: absolute;
      top: -50%;
      width: 45%;
      height: 62.5%;
      background: var(--main-color);
    }
  }
  
  .left-hand::after{
      transform: rotate(-35deg);
      left: 15%;
    }
  
    
  .right-hand::after{
      transform: rotate(35deg);
      right: 15%;
    } 
  
  .hero-fingers{
    display: flex;
    position: absolute;
    bottom: -60%;
    width: 100%;
    height: 60%;
    background: var(--second-color);
    border-radius: 7.5vmin 7.5vmin 2.5vmin 2.5vmin / 12.5vmin 12.5vmin 7.5vmin 7.5vmin;
    
    .hero-finger{
      position: relative;
      bottom: -50%;
      width: 33.3%;
      height: 60%;
      background: var(--second-color);
      border-radius: 50%;
    }
  }
  
  .hero-fingers::after{
    content:'';
    position: absolute;
    top: 25%;
    width: 33.3%;
    height: 60%;
    background: var(--second-color);
    border-radius: 50%;    
  }
  .left-fingers::after{
    right: -15%;
    transform: rotate(-25deg);
    
  }
  .right-fingers::after{
    left: -15%;
    transform: rotate(25deg);
    
  }
}

.hero-legs{  
    position: relative;
    width: 100%;
    height: 60%;
  
  .hero-belt{
    position: relative;
    top: -5%;
    width: 35%;
    height: 12.5%;
    background: var(--second-color);
    left: 32.5%;
  }
  
  .hero-pants{
    position: relative;
    width: 35%;
    height: 25%;
    background: var(--panties);
    left: 32.5%;
    top: -5%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0 0 35vmin 35vmin / 0 0 15vmin 15vmin ; 
  }
  
  .hero-leg{
    position: absolute;
    top: 20.5%;
    width: 17.5%;
    height: 50%;
    background: var(--main-color);
    
    &::after{
      content:'';
      position: absolute;
      bottom: -40%;
      width: 100%;
      height: 75%;
      background: var(--main-color);
    }
  }
  .left-leg{
    left: 32.5%;
    transform: rotate(30deg);
    transform-origin: top;
    &::after{
      border-radius: 1.5vmin 0;
      transform: rotate(-35deg);
      right: -12.5%;
    }
  }
  .right-leg{
    right: 32.5%;
    transform: rotate(-30deg);
    transform-origin: top;
    &::after{
      border-radius: 0 1.5vmin;
      transform: rotate(35deg);
      left: -12.5%;
    }
  }
  
  .hero-boot{
    position: absolute;
    bottom: 0%;
    width: 20%;
    height: 30%;
    background: var(--second-color);
    border-radius: .5vmin .5vmin 0 0;
    
    &::after{
      content:'';
      position: absolute;
      top: -55%;
      width: 45%;
      transform: rotate(45deg);
      height: 62.5%;
      background: var(--main-color);
    }
    
    &::before{
      content:'';
      position: absolute;
      bottom: -35%;
      width: 125%;
      height: 75%;
      background: var(--second-color);     
    }
  }
  
  .left-boot{
    left: 22%;
    &::after{      
      left: 17.5%;
    }
    &::before{
      right: 0;
      border-radius: 2.5vmin 0 0 0;
      transform: rotate(-2.5deg);      
    }
  }
  .right-boot{
    right: 22%;
    &::after{
      right: 17.5%;
    }
    &::before{
      left: 0;
      border-radius: 0 2.5vmin 0 0;
      transform: rotate(2.5deg);      
    }
  }
}

.hero-cape{
  position: absolute;
  top: 52.5%;
  height: 45%;
  width: 100%;
  background: var(--cape);
  border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
  
  &::after{
    content:'';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 5%;
    background: var(--bg);
    border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;    
  }
}

.hashnode{
  position: relative;
  width: var(--h-length);
  height: var(--h-length);
  background: var(--h-blue);
  border-radius: calc(var(--h-length) / 3.5);
  transform: rotate(45deg);
  &::after{
    content: '';
    position: absolute;
    height: 40%;
    width: 40%;
    border-radius: 100%;
    background: #ddd;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}



/* signature */

.link {
    position: fixed;
    z-index: 100;
    left: calc(2.5vmin - 0.75rem);
    bottom: calc(2.5vmin - 0.75rem);
    font-size: 1.5rem;
    font-family: arial, sans-serif;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    .my-name {
        position: relative;
    }

    .before,
    .after {
        overflow: hidden;
        width: 0px;
        transition: width 0.5s;
        transform-origin: right;
    }

    .before-text {
        display: inline-block;
        width: auto;
        text-align: right;
    }

    .after-text {
        display: flex;
        align-items: center;
        width: auto;
        height: 3rem;
        transform-origin: top center;
    }

    &:hover .before {
        width: 2.5rem;
    }

    &:hover .after {
        width: 4rem;
    }

    &:hover .spin {
        display: inline-block;
        transition: 0.5s transform 0.5s ease-in-out;
        transform: rotate(360deg);
    }
}

              
            
!

JS

              
                /* @m4xew */
              
            
!
999px

Console