.head
.face
.mouth
.eye-group
.eye.eye-left
.eye.eye-right
View Compiled
$black: #20184e;
$head-color: #fbd671;
$background: #feee9d;
$tongue-color: #f15962;
html,
body {
height: 100%;
width: 100%;
overflow: hidden;
padding: 0;
margin: 0;
}
body {
background: $background;
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
* {
position: absolute;
}
*:before,
*:after {
content: "";
position: absolute;
}
.head {
border-radius: 50%;
width: 300px;
height: 300px;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
background-color: $head-color;
box-shadow: inset -10px -10px 0px darken($head-color, 20%);
}
.face {
width: 150px;
height: 170px;
left: 75px;
top: 75px;
}
.mouth {
width: 100%;
height: 75px;
bottom: 0;
background-color: $black;
border: 5px solid $black;
border-radius: 10px 10px 150px 150px;
overflow: hidden;
// fix for Safari
-webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
&:after {
width: 100px;
height: 80px;
left: 25px;
top: 30px;
background-color: $tongue-color;
border-radius: 50%;
}
}
.eye-group {
top: 10px;
width: 150px;
height: 50px;
.eye {
width: 30px;
height: 50px;
background-color: $black;
border-radius: 100%;
border: 5px solid $black;
&:after {
width: 10px;
height: 15px;
top: 5px;
background-color: #fbd671;
border-radius: 50%;
}
&.eye-left {
left: 15px;
}
&.eye-right {
right: 15px;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.