Skip to content

Instantly share code, notes, and snippets.

@khalidmesbah
Created March 19, 2022 19:51
Show Gist options
  • Save khalidmesbah/f12c33e023cbab67e38f315f20d99fc4 to your computer and use it in GitHub Desktop.
Save khalidmesbah/f12c33e023cbab67e38f315f20d99fc4 to your computer and use it in GitHub Desktop.
the imposter
<div class="body">
<div class="left-leg"></div>
<div class="right-leg"></div>
<div class="backpack"></div>
<div class="glass"></div>
<div class="shadow"></div>
</div>
*,
*::after,
*::before {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #333;
}
.body {
background: #840931;
width: 140px;
height: 200px;
border: 10px solid #000;
border-bottom: 0;
border-radius: 60px 80px 0 0;
position: relative;
}
.body::after {
content: "";
position: absolute;
width: 92%;
height: 85%;
background: #ea1616;
left: 6px;
border-radius: 58% 70% 58% 42% / 38% 50% 88% 89%;
}
.left-leg {
position: absolute;
width: 60px;
height: 60px;
background: #840931;
border: 10px solid #000;
border-radius: 0 0 22px 22px;
bottom: -50px;
left: -10px;
border-top: none;
&::after {
position: absolute;
content: "";
width: 40px;
border-radius: 0 0 20px;
height: 10px;
top: 0;
left: 50px;
background: #000;
z-index: 1;
}
}
.right-leg {
position: absolute;
width: 60px;
height: 60px;
background: #840931;
border: 10px solid #000;
border-radius: 0 0 22px 22px;
bottom: -40px;
right: -10px;
border-top: none;
z-index: -1;
}
.backpack {
width: 35px;
height: 120px;
background: #ea1616;
position: absolute;
border: 10px solid #000;
left: -45px;
top: 60px;
border-right: 0;
border-radius: 20px 0 0 20px;
&::after {
position: absolute;
content: "";
background: #840931;
content: "";
height: 78px;
width: 26px;
bottom: -0.5px;
border-radius: 12px 0 0 8px;
}
}
.glass {
height: 75px;
width: 110px;
background-color: #225381;
z-index: 2;
position: absolute;
top: 30px;
left: 40px;
border-radius: 25px 50px 30px 30px;
border: 10px solid black;
&::before {
content: "";
position: absolute;
width: 85%;
height: 65%;
background-color: #71d4ec;
border-radius: 0 28px 3px 30px;
right: 0;
top: 0;
}
&::after {
content: "";
position: absolute;
width: 45%;
height: 22%;
background-color: #f7f7f7;
left: 39px;
top: 5px;
border-radius: 10px;
transform: rotate(6deg);
}
}
.shadow {
height: 40px;
width: 210px;
background-color: rgba(153, 130, 0, 0.2);
position: absolute;
bottom: -60px;
right: -40px;
border-radius: 50%;
z-index: -2;
}
@khalidmesbah
Copy link
Author

the imposter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment