JSFiddle - React, Tailwind, and code Playground
by mrnobody
HTML
<div class="wrap">
<figure class="face">
<div class="scar">
<div class="seam"></div>
</div>
<div class="eye eye--left">
<div class="eyeball">
<div class="pupil"></div>
</div>
</div>
<div class="eye eye--right">
<div class="eyeball">
<div class="pupil"></div>
</div>
</div>
<div class="nose"></div>
<div class="mouth">
<div class="tooth"></div>
<div class="tooth"></div>
<div class="tooth"></div>
</div>
</figure>
</div>
CSS
html,
body {
height: 100%; }
body {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
margin: 0; }
.wrap {
position: relative;
width: 320px;
height: 320px;
margin: auto; }
.face {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 200px;
height: 210px;
margin: auto;
text-align: center;
border-radius: 50%;
background-color: #87AA98;
box-shadow: inset -5px -15px rgba(0, 0, 0, 0.05);
-webkit-animation: anim-face 10s infinite alternate;
animation: anim-face 10s infinite alternate; }
.scar {
width: 60px;
position: absolute;
left: 36%;
height: 34px;
overflow: hidden; }
.scar:before {
content: "";
left: 50%;
top: -50%;
position: absolute;
width: 40px;
height: 90px;
border-right: 1px solid #3c3c3c;
border-radius: 50%;
-webkit-transform: rotate(-140deg) translate3d(-8px, -18px, 0);
transform: rotate(-140deg) translate3d(-8px, -18px, 0); }
.seam {
width: 100%;
height: 100%;
position: relative; }
.seam:before,
.seam:after {
position: absolute;
right: 5px;
top: 47%;
-webkit-transform: rotate(12deg);
-ms-transform: rotate(12deg);
transform: rotate(12deg);
content: "";
width: 11px;
height: 1px;
border-top: 1px solid #3c3c3c; }
.seam:after {
top: 75%;
right: 18px;
-webkit-transform: rotate(15deg);
-ms-transform: rotate(15deg);
transform: rotate(15deg); }
.eye {
position: relative;
top: 50px;
display: inline-block;
width: 50px;
height: 50px;
margin: 0 20px;
border-radius: 50%;
background-color: #333; }
.eye--left {
box-shadow: 1px 3px 1px 3px rgba(0, 0, 0, 0.15); }
.eye--left .pupil {
-webkit-animation: move-pupil-left 5.5s infinite linear alternate;
animation: move-pupil-left 5.5s infinite linear alternate;
bottom: -5px; }
.eye--right {
width: 39px;
height: 36px;
box-shadow: -2px 5px 1px 2px rgba(0,...