<div class="redhat">
<div class="hat">
<div class="top">
<div class="spot">
</div>
</div>
<div class="ring">
</div>
<div class="bottom">
</div>
</div>
</div>
:root {
--logo-color: #CC0000;
--background-color: #FFF;
--dark-color: #000;
}
body {
width: 100vw;
height: 100vh;
overflow-x: hidden;
display: flex;
align-items: center;
justify-content: center;
background-color: #F5F5F5;
}
.redhat {
width: 250px;
height: 250px;
position: relative;
border-radius: 50%;
background-color: var(--dark-color);
overflow: hidden;
}
.hat {
position: absolute;
top: 75px;
left: 75px;
z-index: 3;
}
.top, .ring, .bottom, .face {
transform-style: preserve-3d;
transform: perspective(100px) rotateZ(5deg) rotateX(20deg);
}
.top {
width: 100px;
height: 50px;
background-color: var(--logo-color);
position: relative;
border-bottom-left-radius: 100% 10px;
border-bottom-right-radius: 100% 10px;
border-top-left-radius: 100% 20px;
border-top-right-radius: 100% 20px;
z-index: 2;
}
.top:after {
content: '';
width: 20px;
height: 20px;
background-color: var(--dark-color);
position: absolute;
border-radius: 50%;
left: 25px;
top: -15px;
}
.ring {
width: 111px;
height: 15px;
background-color: var(--dark-color);
position: absolute;
left: -8px;
top: 45px;
border-bottom-top-radius: 100% 10px;
border-bottom-top-radius: 100% ;
border-bottom-left-radius: 100% 10px;
border-bottom-right-radius: 100% 10px;
z-index: 2;
}
.bottom {
position: absolute;
height: 50px;
width: 200px;
left: -50px;
top: 35px;
background-color: var(--logo-color);
border-radius: 50%;
z-index: 1;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.