tiger

In this example below you will see how to do a tiger with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by nen, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright nen ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>tiger</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <body>
 <!-- Begin Image -->
 <!-- Invisible Box-->
 <div class="box">
   
    <!-- Circular Head-->
    <div class="head">  
      
      <!-- Circular Head Copy -->
      <div class="head-copy"></div>
      
     <!-- cheek -left -->
      <div class="cheek-left"> </div>
      
   <!-- Left Ear ~ white-->
      <div class="ear-left">
        
       <!-- strips ~ black -->
      <div class="strip-inner-ear"></div>
        <div class="strip-outer-ear"> </div>
      </div>
      
      <!-- Right Ear ~ orange-->
       <div class="ear-right">
      <!-- Inner Ear ~ black-->
         <!-- strips - black -->
        <div class="strip-inner-ear"></div>
         <div class="strip-outer-ear"> </div>
      </div>
      
      <!-- eye left --->
      <div class= "eye-left"> 
      
        <!-- pupil -->
        <div class ="pupil"> </div>
      </div>
      
      <!-- eye right -->
      <div class ="eye-right"> 
        <div class= "pupil"> </div>
      </div>
        
      <!-- nose --->
      <div class="nose"> </div>
      
      <!-- stripe -->
      <div class="left-stripe"></div>
      <div class="right-stripe"></div>
      
      
    <!-- End Head -->
    </div>
 <!-- End Invisible Box -->
 </div>
</body>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/nen/tiger-WpoBPb */
body{
  background: #249305;
}

.box {
  position: relative;
  margin: auto;
  margin-top: 15%;
  width: 600px;
  height: 600px;
  background:none;
}

.head {
  position: absolute;
  top:16.5%;
  left: 25%;
  width: 40%;
  height: 60%;
  background: #e87006;
  border-radius: 50%;
}

.head-copy {
  position: absolute;
  width: 100%;
  height: 100%;
  position: absoulte;
  background: #e87006;
  border-radius: 50%;
  z-index: 2;
}

.cheek-left{
    position: absolute;
  width: 80%;
  height: 80%;
  left:-5%;
  top: 10%;
  background: #e87006;
  -webkit-clip-path: polygon(67% 0, 0 89%, 100% 76%);
clip-path: polygon(67% 0, 0 89%, 100% 76%);
}



.ear-left {
  position: absolute;
  width: 60%;
  height: 55%;
  left: 1%;
  top: -15%;
  background: #e87006;
  -webkit-clip-path: polygon(27% 0, 0% 100%, 100% 100%);
clip-path: polygon(27% 0, 0% 100%, 100% 100%);
  z-index: 1;
} 

.ear-right {
  position: absolute;
  width: 60%;
  height: 55%;
  right: 1%;
  top: -15%;
  background: #e87006;
  -webkit-clip-path: polygon(77% 0, 0% 100%, 100% 100%);
clip-path: polygon(77% 0, 0% 100%, 100% 100%);
  z-index: 1;
}

.strip-inner-ear {
  position: absolute;
  width: 80%;
  height: 80%;
  left: 10%;
  top: 10%;
  background: black;
-webkit-clip-path: polygon(54% 0, 0% 100%, 100% 100%);
clip-path: polygon(54% 0, 0% 100%, 100% 100%);
}

/*.strip-outer-ear {
  position: absolute;
  width: 80%;
  height: 80%;
  left: 10%;
  top: 10%;
  background: black;
-webkit-clip-path: polygon(0 0, 0% 100%, 23% 100%);
clip-path: polygon(0 0, 0% 100%, 23% 100%);
}*/

.eye-left {
  position: absolute;
  width: 40%;
  height: 30%;
  left: 10%;
  top: 30%;
  background: yellow;
  z-index: 3;
  -webkit-clip-path: ellipse(25% 11% at 49% 48%);
clip-path: ellipse(25% 11% at 49% 48%);
}

.eye-right {
  position: absolute;
  width: 40%;
  height: 30%;
  right: 10%;
  top: 30%;
  background: yellow;
  z-index: 3;
  -webkit-clip-path: ellipse(25% 11% at 49% 48%);
clip-path: ellipse(25% 11% at 49% 48%);
}

.pupil {
  position: absolute;
  width: 10%;
  height: 20%;
  left: 50%;
  top: 32%;
  background: black;
  z-index: 4;
  -webkit-clip-path: circle(50% at 50% 50%);
clip-path: circle(50% at 50% 50%);
}


/*.nose {
  position: absolute;
  width: 20%;
  height: 30%;
  left: 40%;
  top: 55%;
  background: black;
  -webkit-clip-path: polygon(50% 0%, 13% 69%, 90% 67%);
clip-path: polygon(50% 0%, 13% 69%, 90% 67%);
  z-index: 2;
}

/*.left-stripe {
    position: absolute;
  width: 70%;
  height: 80%;
  left: 10%;
  top: 2%;
  background: black;
  -webkit-clip-path: polygon(53% 33%, 0 70%, 2% 100%);
clip-path: polygon(53% 33%, 0 70%, 2% 100%);
   z-index: 2;
}

/*.right-stripe{
  position: absolute;
  width: 70%;
  height: 50%;
  right: 0%;
  top: 10%;
  background: black;
  -webkit-clip-path: polygon(1% 0, 86% 96%, 100% 86%);
clip-path: polygon(1% 0, 86% 96%, 100% 86%);
   z-index: 2;
}


Comments