<div class="background">
<div class="cat">
<div class="ears"></div>
<div class="body">
<div class="face">
<div class="eyes"></div>
<div class="nose"></div>
<div class="mouth"></div>
</div>
</div>
</div>
</div>
$cat-color: #c6e2ff;
$bg-color: #ddd;
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background: radial-gradient(lighten($bg-color, 5), darken($bg-color, 8));;
}
.cat {
transform: scale(.6);
}
.background {
width: 400px;
height: 400px;
border-radius: 50%;
box-shadow: 0 0px 35px rgba(0, 0, 0, 0.35);
overflow: hidden;
background: #333;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.body {
width: 250px;
height: 380px;
border-radius: 50% 50% 40% 40%;
background: radial-gradient(circle at 50% 1%, $cat-color, darken($cat-color, 18));
background-size: cover;
background-repeat: no-repeat;
box-shadow:
0 0 6px rgba($cat-color,0.92),
0 0 30px rgba($cat-color,0.34),
0 0 12px rgba(darken($cat-color, 45),0.52),
0 0 21px rgba(darken($cat-color, 45),0.92),
0 0 34px rgba(darken($cat-color, 45),0.78),
0 0 54px rgba(darken($cat-color, 45),0.92);
position: relative;
&:before {
content: "";
width: 240px;
left: 5px;
height: 300px;
position: absolute;
border-radius: 50% 50% 34% 34%;
top: -10px;
background: radial-gradient(circle at 50% 30%, $cat-color, darken($cat-color, 15));
}
}
.face {
position: absolute;
width: 100%;
height: 120px;
top: 40px;
.eyes {
&:before,
&:after {
content: "";
width: 20px;
height: 30px;
border-radius: 44% 44% 47% 53% / 40% 45% 55% 60%;
background: black;
position: absolute;
top: 20px;
left: 60px;
}
&:after {
left: initial;
right: 60px;
transform: rotateY(-180deg);
}
}
.nose {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
&:before,
&:after {
content: "";
width: 10px;
height: 17px;
background: black;
border-radius: 10px 10px 0 0;
position: absolute;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
&:after {
transform: rotate(45deg);
transform-origin: 100% 100%;
right: 0;
}
}
}
.mouth {
position: absolute;
width: 12px;
height: 8px;
background-color: black;
top: 55%;
left: calc(50% - 6px);
border-radius: 50%;
transform: translateZ(10px);
&:before,
&:after {
content: '';
display: block;
position: absolute;
width: 10px;
height: 12px;
border: 2px solid black;
top: 80%;
border-radius: 100px;
border-top-color: transparent;
z-index: -1;
}
&:before {
border-left-color: transparent;
right: calc(50% - 2px);
transform-origin: top right;
transform: rotate(10deg);
}
&:after {
border-right-color: transparent;
left: calc(50% - 2px);
transform-origin: top left;
transform: rotate(-10deg);
}
}
.ears {
position: relative;
&:before,
&:after {
content: "";
width: 100px;
height: 100px;
border-radius: 15px 10px 10px 10px;
position: absolute;
background: red;
transform: rotate(12deg);
left: 30px;
top: -12px;
z-index: 0;
background: radial-gradient(circle at 50% 40%, $cat-color, darken($cat-color, 10));
box-shadow:
0 0 6px rgba($cat-color,0.92),
0 0 30px rgba($cat-color,0.34),
0 0 12px rgba(darken($cat-color, 45),0.52),
0 0 21px rgba(darken($cat-color, 45),0.92),
0 0 34px rgba(darken($cat-color, 45),0.78),
0 0 54px rgba(darken($cat-color, 45),0.92);
}
&:after {
left: initial;
right: 30px;
transform: rotate(-12deg);
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.