JSFiddle - React, Tailwind, and code Playground
by Vaibhav Mehta
HAML
.bird
.hat
.head
.nose
.hand
.legs
%img(src="https://cdn.dribbble.com/users/90377/screenshots/2207979/simpledri.png" alt="")
SCSS
*,
*::before,
*::after {
margin: 0;
padding: 0;
outline: 0;
box-sizing: border-box;
}
.bird {
height: 120px;
width: 120px;
position: relative;
top: 50px;
left: 50px;
}
.head {
height: 130px;
width: 130px;
border: 6px solid #212121;
border-radius: 50%;
overflow: hidden;
background-color: #fff;
position: relative;
z-index: 1;
&::before,
&::after {
content: '';
position: absolute;
}
&::before {
height: 25px;
width: 100px;
left: -15px;
top: 0;
background-color: #212121;
transform: rotate(-30deg);
}
&::after {
height: 15px;
width: 10px;
background-color: #212121;
border-radius: 50%;
top: 50%;
right: 10px;
transform: translateY(-50%);
}
}
.hat {
height: 40px;
width: 80px;
background-color: gold;
border-top-left-radius: 110px;
border-top-right-radius: 110px;
border: 6px solid #212121;
border-bottom: 0;
position: absolute;
top: -35px;
z-index: 2;
transform: rotate(-20deg);
&::after {
content: '';
height: 28px;
width: 110px;
border: 6px solid #212121;
position: absolute;
background-color: gold;
border-radius: 20px;
left: -20px;
bottom: -20px;
}
}
.nose {
width: 30px;
height: 30px;
border: 6px solid #000;
transform: rotate(-45deg) skew(10deg, 10deg) translateY(-50%);
border-radius: 3px;
background-color: #FFDE46;
position: absolute;
right: -36px;
top: 50%;
}
img {
position: absolute;
z-index: -1;
top: 20px;
}
.hand {
height: 40px;
width: 43px;
border: 6px solid #212121;
border-radius: 20px 0 0 20px;
position: absolute;
border-right: 0;
top: 65px;
left: 25px;
transform: rotate(-45deg);
z-index: 1;
animation: move-hand 1s ease-in infinite;
}
.legs {
left: 50%;
position: absolute;
transform: translateX(-50%);
margin-left: -10px;
margin-top: -5px;
&::before,
&::after {
content: '';
position: absolute;
height: 35px;
width:...