cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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.

            
              <html>
  
  <head>
  </head>
  
  <body>
    <h1 id="title">Bear Cub</h1>
   <!-- Begin Image -->
   <!-- Invisible Box-->
   <div class="box">
   
    <!-- Circular Head-->
    <div class="head">
      <div class="left-ear"></div>
      <div class="right-ear"></div>
      
      <div class="eye-left">
        <div class="pupil"></div>
      </div>
      <div class="eye-right">
        <div class="pupil"></div>
      </div>
      
      <div class="outer-nose">
        <div class="inner-nose"></div>
        <div class="inner-nose-left"></div>
        <div class="inner-nose-right"></div>
        <div class="upper-mouth"></div>
        <div class="down-mouth">
          <div class="black-void"></div>
        </div>
        <div class="tognue"></div>
      </div> <!-- -end outer nose -->
      
      
        
     
     
     
     
    </div> <!-- end head -->
   
     
     
 </div> <!-- end of box -->
  
    
    
    
    <div> <!-- for footer -->
      <h5><a href="http://www.eleftheriabatsou.com" target="_blank">Eleftheria </a> | <a href="https://codepen.io/EleftheriaBatsou" target="_blank">Projects</a> | <a href="https://www.youtube.com/channel/UCC-WwYv3DEW7Nkm_IP6VeQQ" target="_blank"> Coding videos </a></h5>
    </div> <!-- end footer -->
  
  </body>
</html>
            
          
!
            
              body{
  background: #ECEFF1; /*light grey */
}

#title{
  text-align: center;
}

/* An invisible box will be centered horizontally due to the following code*/
.box{
  /* Position relative means the element is positioned relative to its normal position, which would be the very top left corner as it is the first div in the body. */
  
  /* When the position is set to relative, using display: block; and margin:auto; will automatically center the box horizontally. */
  position: relative;
  margin: auto;
  display: block;
  /*optional background or border
  border: solid 4px red;
  */
  margin-top: 1%;
  width: 600px;
  height: 420px;
  background: none;
}

/* The width of the div is 50% and the height 67%. This means that the width is 50% of the box and the height 67% of the box. */
.head{
  position: absolute;
  top: 16.5%;
  left: 25%;
  width: 50%;
  height: 70%;
  background: #B0BEC5; /* Light grey */
  border-radius: 50%; /* To make a circle */
}

.left-ear{
  position: absolute;
  top: 6%;
  left: -15%;
  width: 48%;
  height: 57%;
  background: #B0BEC5; /* Light grey */
  border-radius: 50%; /* To make a circle */
}

.right-ear{
  position: absolute;
  top: 6%;
  right: -15%;
  width: 48%;
  height: 57%;
  background: #B0BEC5; /* Light grey */
  border-radius: 50%; /* To make a circle */
}

.eye-left{
  position: absolute;
  background: #263238; /* dark grey */
  width: 34%;
  height: 30%;
  top: 25%;
  left: 13%;
  border-radius: 50%;
  z-index: 3;
}
.eye-right{
  position: absolute;
  background: #263238; /* dark grey */
  width: 34%;
  height: 30%;
  top: 25%;
  right: 13%;
  border-radius: 50%;
  z-index: 3;
}
.pupil{
  position: absolute;
  width: 74%;
  height: 70%;
  top: 10%;
  left: 23%;
  border-radius: 50%;
  background: black;
}

.outer-nose{
  position: absolute;
  width: 58%;
  height: 63%;
  top: 42%;
  left: 22%;
  border-radius: 50%;
  background: #CFD8DC;
  z-index: 4;
}

.inner-nose{
  position: absolute;
  width: 58%;
  height: 43%;
  top: 10%;
  left: 22%;
  border-radius: 40%;
  background: #140514;
  z-index: 4;
  
  -webkit-clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.inner-nose-left{
  position: absolute;
  width: 26%;
  height: 23%;
  top: 26%;
  left: 24%;
  border-radius: 40%;
  background: #000; 
  z-index: 4;
  
  -webkit-clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.inner-nose-right{
  position: absolute;
  width: 26%;
  height: 23%;
  top: 26%;
  right: 24%;
  border-radius: 40%;
  background: #000; 
  z-index: 4;
  
  -webkit-clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.upper-mouth{
  position: absolute;
  width: 56%;
  height: 15%;
  top: 56%;
  left: 23%;
  border-radius: 40%;
  background: #37474F; 
  z-index: 4;
  
  -webkit-clip-path: polygon(21% 0, 81% 0, 100% 100%, 0 100%);
clip-path: polygon(21% 0, 81% 0, 100% 100%, 0 100%);
}

.down-mouth{
  position: absolute;
  width: 55%;
  height: 13%;
  top: 65%;
  left: 23.5%;
  border-radius: 40%;
  background: #37474F; 
  z-index: 4;
  
  -webkit-clip-path: polygon(0 0, 100% 0, 87% 100%, 11% 100%);
clip-path: polygon(0 0, 100% 0, 87% 100%, 11% 100%);
}

.black-void{
  position: absolute;
  width: 88%;
  height: 50%;
  top: 1%;
  left: 5%;
  border-radius: 50%;
  background: black;
}

.tognue{
  position: absolute;
  width: 46%;
  height: 57%;
  top: 68%;
  left: 28%;
  border-radius: 10%;
  background: pink;
  
  -webkit-clip-path: polygon(0 0, 100% 0, 78% 100%, 20% 100%);
clip-path: polygon(0 0, 100% 0, 78% 100%, 20% 100%);
  
  z-index: 4;
}


            
          
!
999px
Loading ..................

Console