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 DM_Daria, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright DM_Daria ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

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

  
</head>

<body>

  <div id="tiger">
  
  <div id="head">
    
    <div id="mouth"></div>
    <div class="eye left"></div>
    <div class="eye right"></div>
    <div class="nose"></div>
    <div class="mouth"></div>
  </div>
  <div class="ear left"></div>
  <div class="ear right"></div>
  <div class="hair"></div>
  <div class="stripe left"></div>
  <div class="stripe2 right"></div>
  <div class="stripe-cheek left"></div>
  <div class="stripe-cheek right"></div>
  <div id="body">
    <div class="stipe-body"></div>
    <div class="stipe-body-r"></div>
  </div>
  <div class="front-leg left"></div>
  <div class="front-leg right"></div>
  <div class="back-leg left">
    <div class="stripe-leg left"></div>
    <span></span>
  </div>
  <div class="back-leg right">
    <div class="stripe-leg right"></div>
    <span></span>
  </div>
  <div class="tail-top"></div>
  <div class="tail-bot"></div>
  
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/DM_Daria/tiger-jLRyKm */
body {
  padding-top: 50px;
  padding-left: 50px;
}
#tiger {
  position: relative;
  width: 250px;
  height: 400px;
}
#head {
  width: 250px;
  height: 250px;
  border-radius: 40% 50% 40% 50% /40% 50% 40% 50%;
  background:#f88127;
  overflow:hidden;
  border-bottom: 1px solid #000;
}
.ear {
  position: absolute;
  z-index:-1;
  border: 20px solid #f88127;
  width: 70px;
  height:70px;
  background: #fff;
  border-radius: 50% / 15%;
}
.ear.left {  
  top: 0;
  transform: skew(20deg);
  box-shadow: inset 2px -3px 4px rgba(0,0,0,.3);
}
.ear.right {
  top: 10px;
  right: 0;
  transform: skew(-20deg);
  box-shadow: inset -2px -3px 4px rgba(0,0,0,.2);
}
.ear:before {
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  right: -5%;
  left: -5%;
  background: inherit;
  border-radius: 5% / 50%;  
}
.ear.right:before {
  box-shadow: inset -3px -3px 4px rgba(0,0,0,.3);
}
.ear.left:before {
  box-shadow: inset 3px -3px 4px rgba(0,0,0,.3);
}
.hair {
  position: absolute;
  top: -14px;
  left: 77px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 10px 10px 0 0 #f88127;
  transform: rotate(-30deg);
  
}
.hair:before {
  content:'';
  position: absolute;
  top:0;
  left: 17px;
  width: 27px;
  height: 35px;
  border-radius: 50%;
  box-shadow: 12px 0px 0 0 #f88127;
  transform: rotate(60deg);
}
.hair:after {
  content:'';
  position: absolute;
  top:35px;
  left: 52px;
  width: 22px;
  height: 37px;
  border-radius: 50%;
  box-shadow: 12px 0px 0 0 #f88127;
  transform: rotate(-142deg);
}
#mouth {
  position: absolute;
  top: 160px;
  left: 20px;
  width: 210px;
  height: 210px;
  border-radius: 50% 40% 50% 40% /50% 40% 50% 40%;
  background: #ffffff;
}
.eye {
  position: absolute;
  top: 125px;
  width: 16px;
	height: 18px;
	background: #000;
	-moz-border-radius: 8px / 9px;
	-webkit-border-radius: 8px / 9px;
	border-radius: 8px / 9px;
}
.eye.left {
  left: 65px;
}
.eye.right {
  right: 65px;
}
.eye:before {
  content:'';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  box-shadow: -3px -3px 2px 0 #f7f7f7;
  transform: rotate(15deg);
}
.nose {
  position: absolute;
  top: 170px;
  left: 110px;
  width: 35px;
  height: 22px;
  background-color: #666;
  box-shadow: 2px 3px 3px rgba(0,0,0, .2);
   -webkit-border-radius:60%  60%  40%  40%  / 60%   60%   50%  50%;
   border-radius:  60%  60%  40%  40%  / 60%   60%   50%  50%;
  z-index:5;
}
.nose:before {
  position: absolute;
  content:'';
  left: 7px;
  top: 8px;
  width: 25px;
  height: 12px;
  border-radius: 50%;
  box-shadow: -6px -4px 5px 0 #f7f7f7;
}
.mouth {
  position: absolute;
  top: 174px;
  left: 103px;
   width: 22px;
   height: 35px;
   background-color: #fff;
    -webkit-border-radius:108px 108px 72px 72px / 63px 63px 63px 63px ;
   border-radius: 50% / 60%  ;
  box-shadow: 1px 2px 0 #000;
}
.mouth:after {
  content:'';
  position: absolute;
/*   top: 175px; */
  left: 24px;
   width: 22px;
   height: 35px;
   background-color: #fff;
    -webkit-border-radius:108px 108px 72px 72px / 63px 63px 63px 63px ;
   border-radius: 50% / 60%  ;
  box-shadow: -1px 2px 0 #000;
}

.stripe {
  position: absolute;
  width: 15px;
  height: 40px;
  background: #000;
  border-radius: 3px 5px 50% 50%;
}
.stripe:after {
  content:'';
  position: absolute;
  width: 12px;
  height: 33px;
  background: #000;
  border-radius: 0px 8px 50% 50%;
  left: 17px;
}
.stripe2:after {
  content:'';
  position: absolute;
  width: 12px;
  height: 33px;
  background: #000;
  border-radius: 2px 2px 50% 50%;
}
.stripe2 {
  position: absolute;
  width: 14px;
  height: 44px;
  background: #000;
  border-radius: 3px 5px 50% 50%;
}
.stripe.left {
  top: 1px;
  background: #000;
  left: 80px;
  transform: rotate(-23deg);
}
.stripe.left:after {
  top: 4px;
  left: 17px;
  transform: skew(-3deg);
}
.stripe2.right { 
  top: 10px;
  right: 73px;
  transform: rotate(23deg);
}
.stripe2.right:after {
  top: 1px;
  right: 17px;
  transform: skew(3deg);
}

.stripe-cheek.left {
  position: absolute;
  top: 90px;
  width: 40px;
  height: 16px;
  background: #000;
  border-radius: 0 50% 50% 6px;
  transform: rotate(10deg);
}
.stripe-cheek.left:after {
  content: '';
  position: absolute;
  top: 23px;
  left: 4px;
  width: 45px;
  height: 18px;
  background: #000;
  border-radius: 0 50% 50% 5px;
  transform: skew(8deg);
}
.stripe-cheek.left:before {
  content: '';
  position: absolute;
  top: 47px;
  left: 9px;
  width: 38px;
  height: 15px;
  background: #000;
  border-radius: 0 50% 50% 5px;
  transform: skew(18deg);
}

.stripe-cheek.right{
  position: absolute;
  top: 93px;
  right: 3px;
  width: 40px;
  height: 20px;
  background: #000;
  border-radius: 50% 0 6px 50%;
  transform: rotate(-11deg);
}
.stripe-cheek.right:after {
  content: '';
  position: absolute;
  top: 25px;
  right: 1px;
  width: 45px;
  height: 17px;
  background: #000;
  border-radius: 50% 0 5px 50%;
  transform: skew(-8deg);
}
.stripe-cheek.right:before {
  content: '';
  position: absolute;
  top: 47px;
  right: 6px;
  width: 35px;
  height: 15px;
  background: #000;
  border-radius: 50% 2px 3px 50%;
  transform: skew(-14deg);
}

#body {
  position: absolute;
  left: 80px;
  top: 240px;
  width: 100px;
  height: 120px;
  -webkit-border-radius: 20%  20%  30%  30%  / 50%   50%   30% 30%;
   border-radius:         20%  20%  30%  30%  / 50%   50%   30% 30%;
  background:#f88127;
  z-index:25;
  box-shadow: inset 0px -3px 3px rgba(0,0,0, .2);
}
#body:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 60px;
  height: 80px;
  -webkit-border-radius: 50%   50%   20% 20% / 50%  50%  20%  20%;
   border-radius:        50%   50%   10px 10px / 50%  50%  10px 10px;
  background: #ffffff;
  box-shadow: inset 0px -3px 3px rgba(0,0,0, .2);
}
#body:after {
  content: '';
  position: absolute;
  top: -5px;
  left: 15px;
  width: 70px;
  height: 2px;
  box-shadow: 0px 8px 8px 0 rgba(0,0,0, .3);
}
.front-leg {
  position: absolute;
  top: 260px;
  width: 50px;
  height: 35px;
  background: #f88127;
  z-index:40;
}
.front-leg.left {
  left: 45px;
  border-radius: 50% 0 0 50%;
  transform: rotate(20deg);
}
.front-leg.left:before {
  content: '';
  position: absolute;
  top: 13px;
  left: 2px;
  width: 20px;
  height: 2px;
  background: #000;
  transform: rotate(3deg);
}
.front-leg.left:after {
  content: '';
  position: absolute;
  top: 21px;
  left: 2px;
  width: 20px;
  height: 2px;
  background: #000;
  transform: rotate(-5deg);
}
.front-leg.right {
  right: 40px;
  border-radius: 0 50% 50% 0;
  transform: rotate(-20deg);
}
.front-leg.right:before {
  content: '';
  position: absolute;
  top: 13px;
  right: 2px;
  width: 20px;
  height: 2px;
  background: #000;
  transform: rotate(-3deg);
}
.front-leg.right:after {
  content: '';
  position: absolute;
  top: 21px;
  right: 2px;
  width: 20px;
  height: 2px;
  background: #000;
  transform: rotate(5deg);
}
.back-leg {
  position: absolute;
  top: 315px;
  width: 45px;
  height: 60px;
  background-color: #f88127;
  -webkit-border-radius: 50%  50%  50%  50%  / 60%   60%   40%  40%;
  border-radius:         50%  50%  50%  50%  / 60%   60%   40%  40%;
  z-index:30;
}
.back-leg.left {
  left: 37px;
  box-shadow: inset 0px -2px 3px 2px rgba(0,0,0, .1);
  transform: rotate(-20deg);
}
.back-leg.left:before {
  content: '';
  position: absolute;
  top: 17px;
  left: 9px;
  width: 15px;
  height: 25px;
  background: #ffffff;
  border-radius:50%  50%  50%  50%  / 60%   60%   40%  40%; ;
}
.back-leg.left:after{
  content: '';
  position: absolute;
  left: 3px;
  width: 35px;
  height: 60px;
  -webkit-border-radius: 50%  50%  50%  50%  / 60%   60%   40%  40%;
  border-radius:         60%  60%  60%  60%  / 60%   60%   60%  60%;
  box-shadow: 3px 3px 3px 0 rgba(0,0,0,.2);
  z-index:31;
}
.back-leg.left span {
  position: absolute;
  top: 23px;
  left:28px;
  display: block;
  width: 30px;
  height: 35px;
  background-color:  #f88127;
  box-shadow: inset 0px -3px 8px -3px rgba(0,0,0, .2);
  transform: rotate(-4deg);
  z-index:28;
}
.back-leg.right {
  right: 25px;
  box-shadow: inset 0px -2px 3px 2px rgba(0,0,0, .1);
  transform: rotate(20deg);
}
.back-leg.right span {
  position: absolute;
  top: 22px;
  right:28px;
  display: block;
  width: 30px;
  height: 35px;
  background-color:  #f88127;
  box-shadow: inset 0px -3px 8px -3px rgba(0,0,0, .2);
  transform: rotate(4deg);
}
.back-leg.right:after{
  content: '';
  position: absolute;
  right: 3px;
  width: 35px;
  height: 60px;
  -webkit-border-radius: 50%  50%  50%  50%  / 60%   60%   40%  40%;
  border-radius:         60%  60%  60%  60%  / 60%   60%   60%  60%;
  box-shadow: -3px 3px 3px 0 rgba(0,0,0,.2);
  z-index:31;
}
.back-leg.right:before {
  content: '';
  position: absolute;
  top: 17px;
  right: 9px;
  width: 17px;
  height: 27px;
  background: #ffffff;
  border-radius:50%  50%  50%  50%  / 60%   60%   40%  40%; ;
}
.tail-bot {
  position: absolute;
  right: -20px;
  bottom: 50px;
  width:80px;
  height:30px;  
  border:solid 25px #000;
  border-color:#f88127 transparent transparent transparent;
  border-radius: 50%/40px 50px 0 0;
  transform: rotate(150deg);
}
.tail-bot:before {
  content:'';
  position: absolute;
  top: -18px;
  width: 10px;
  height: 24px;
  background: #000;
  transform: rotate(157deg);
  border-radius: 2px;
}
.tail-bot:after {
  content:'';
  position: absolute;
  top: -24px;
  left: 25px;
  width: 13px;
  height: 24px;
  background: #000;
  transform: rotate(172deg);
  border-radius: 2px;
}
.tail-top {
  position: absolute;
  right: -60px;
  bottom: 45px;
  width:20px;
  height:30px;  
  border:solid 25px #000;
  border-color:#f88127 transparent transparent transparent;
  border-radius: 50%/30px 30px 0 0;
  transform: rotate(-30deg);
}
.tail-top:before {
  content:'';
  position: absolute;
  top: -24px;
  width: 8px;
  height: 24px;
  background: #000;
  transform: rotate(167deg);
  border-radius: 2px;
}
.tail-top:after {
  content: '';
  position: absolute;
  top: -14px;
  right: -30px;
  width: 25px;
  height: 30px;
  background: #f9f9f9;
  border-radius: 0px 5px 50% 50%;
  transform: rotate(-50deg);
  box-shadow:inset 3px 0px 3px rgba(0,0,0,.3);
}
.stripe-leg.left {
  position: absolute;
  left: 36px;
  top: 44px;
  width: 6px;
  height: 15px;
  border-radius:6px 0 0 5px;
  background: #000;
  z-index:29;
  transform: rotate(-22deg);
}
.stripe-leg.right{
  position: absolute;
  right: 35px;
  top: 43px;
  width: 6px;
  height: 15px;
  border-radius:0 6px 5px 0;
  background: #000;
  z-index:29;
  transform: rotate(22deg);
}
.stipe-body {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 10px;
  background: #000;
  border-radius: 5px 50% 50% 0;
  transform: rotate(16deg);
}
.stipe-body:before {
  content:'';
  position: absolute;
  top: 55px;
  left: 7px;
  width: 19px;
  height: 14px;
  background: #000;
  border-radius: 0px 50% 50% 5px;
  transform: skew(10deg);
}

.stipe-body-r {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 25px;
  height: 14px;
  background: #000;
  border-radius: 50% 50% 0;
  transform: rotate(-16deg);
}
.stipe-body-r:before {
  content:'';
  position: absolute;
  top:65px;
  right: 9px;
  width: 17px;
  height: 12px;
  background: #000;
  border-radius: 50% 0 0 50%;
  transform: skew(-10deg);
}

/* #f88127 */

Comments