JSFiddle - React, Tailwind, and code Playground
by luka kupunia
HTML
<div class="man">
<div class="head">
<div id="flat"></div>
<div class="flatstick"></div>
<div class="headd"></div>
<div class="neck"></div>
</div>
<div class="t-shirt">
<div class="neckshirt"></div>
<div id="maintshirt">
<div id="lefttshirt"></div>
<div id="righttshirt"></div>
</div>
</div>
<div class="short">
<div id="short">
<div id="leftshort">
<div class="leg">
<div id="shoes1"></div>
</div>
</div>
<div id="rightshort">
<div class="leg">
<div id="shoes2"></div>
</div>
</div>
</div>
</div>
</div>
CSS
body {
margin: 0;
}
*{
box-sizing: border-box;
}
div.man {
max-width: 400px;
margin: auto;
background: grey;
height: 600px;
padding: 20px 0;
}
div.head {
max-width: 140px;
margin: auto;
}
div#flat {
max-width: 100px;
height: 50px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
background: yellow;
margin: auto;
}
div.flatstick {
max-width: 140px;
height: 5px;
background: black;
margin: auto;
}
div.headd {
max-width: 80px;
height: 50px;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
margin: auto;
background: #FDE3A7;
}
div.neck {
max-width: 20px;
height: 30px;
margin: auto;
margin-top: -2px;
background: #FDE3A7;
}
div.t-shirt {
max-width: 400px;
margin: auto;
position: relative;
}
div.neckshirt {
width: 40px;
height: 25px;
background: #FDE3A7;
margin: auto;
left: 180px;
position: absolute;
z-index: 5;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
}
div#maintshirt {
max-width: 150px;
height: 170px;
margin: auto;
background: green;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
position: relative;
}
div#lefttshirt {
width: 100px;
height: 40px;
background: inherit;
position: absolute;
left: -55px;
top: 20px;
transform: rotate(-40deg);
border-top-right-radius: 20px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
div#righttshirt {
width: 100px;
height: 40px;
background: inherit;
position: absolute;
right: -55px;
top: 20px;
transform: rotate(40deg);
border-top-left-radius: 20px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
div.short {
max-width: 150px;
margin: auto;
}
div#short {
max-width: 150px;
position: relative;
height: 30px;
background: blue;
}
div#leftshort {
width: 60px;
height: 55px;
background: inherit;
position: absolute;
top: 30px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
div#rightshort {
width: 60px;
height: 55px;
background:...