JSFiddle - React, Tailwind, and code Playground
by jessikwa
HTML
<div class="wrapper">
<div class="ear1"></div>
<div class="ear2"></div>
<div class="head">
<div class="eye1"></div>
<div class="eye2"></div>
<div class="nose"></div>
</div>
</div>
CSS
.wrapper {
margin: 10%;
text-align: center;
font-size: 1em;
height: 15em;
width: 18em;
position: relative;
}
.ear1, .ear2 {
background-color: #988577;
position: absolute;
display: inline-block;
height: 10em;
width: 2.75em;
}
.ear1 {
left: 3em;
border-radius: 50% 100%;
}
.ear2 {
right: 3em;
border-radius: 100% 50%;
}
.head {
background-color: #988577;
display: inline-block;
height: 15em;
width: 18em;
margin-top: 4.5em;
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
position: relative;
}
.eye1, .eye2 {
border-radius: 100%;
position: absolute;
background-color: #fff;
top: 3em;
height: 2.8em;
width: 2.8em;
}
.eye1 {
left: 4em;
}
.eye2 {
right: 4em;
}
.eye1:after, .eye2:after {
content: '';
background-color: #333;
position: absolute;
height: 1.1em;
width: 1.1em;
top: 50%;
left: 50%;
border-radius: 100%;
margin: -.55em 0 0 -.55em;
}
.nose {
background-color: #333;
position: absolute;
top: 5.5em;
left: 8em;
width: 2em;
height: .75em;
border-radius: 30% 30% 75% 75%;
}