<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="stylesheet.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>pikaqiu</title>
</head>
<body>
<div id="container">
<div id="nose"></div>
<div class="eye eye-left"></div>
<div class="eye eye-right"></div>
<div class="upperLip"></div>
<div class="lowerLip-wrapper">
<div class="lowerLip"></div>
</div>
<div class="face face-left"></div>
<div class="face face-right"></div>
</div>
</body>
</html>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
*::before{
box-sizing: border-box;
}
*::after{
box-sizing: border-box;
}
body{
background: #ffe000;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
#container{
height: 300px;
width: 460px;
position: relative;
}
#nose{
border: 10px solid transparent;
position: absolute;
left:50%;
top:95px;
transform: translateX(-50%);
border-left: 16px solid transparent;
border-right: 16px solid transparent;
border-top: 16px solid black;
border-radius: 50%;
}
.eye{
position:absolute;
width: 60px;
height: 60px;
background-color: #2e2e2e;
border:2px solid black;
border-radius: 30px;
top:65px;
}
.eye-left{
right: 50%;
margin-right: 90px;
}
.eye-right{
left: 50%;
margin-left: 90px;
}
.eye::before{
content: '';
display: block;
width: 30px;
height: 30px;
background: white;
border-radius: 15px;
left: 8px;
position: absolute;
border: 2px solid black;
}
.upperLip{
position: absolute;
top:120px;
width: 100%;
display: flex;
justify-content: center;
z-index: 1;
}
.upperLip::before{
content: '';
display: block;
width: 80px;
height: 26px;
border: 3px solid black;
border-top:none;
border-right: none;
border-bottom-left-radius: 80px 40px;
transform: rotateZ(-23deg);
background: #ffe000;
}
.upperLip::after{
content: '';
display: block;
width: 80px;
height: 26px;
border: 3px solid black;
border-top: none;
border-left: none;
border-bottom-right-radius: 80px 40px;
transform: rotateZ(23deg);
background: #ffe000;
}
.lowerLip-wrapper{
position: absolute;
width: 100%;
top: 130px;
height:160px;
overflow: hidden;
}
.lowerLip{
position: absolute;
border: 3px solid black;
bottom: 0px;
height: 1300px;
width: 200px;
left: 50%;
transform: translateX(-50%);
border-top: none;
border-bottom-left-radius: 100px 650px;
border-bottom-right-radius: 100px 650px;
border-top-left-radius: 100px 100px;
border-top-right-radius: 100px 100px;
background: #ff444f;
box-shadow: inset 0 1145px 0 20px #9f000a;
}
.face{
position: absolute;
border:3px solid black;
background: red;
top:180px;
width: 80px;
height: 80px;
border-radius: 40px;
}
.face-left{
right: 50%;
margin-right: 130px;
}
.face-right{
left: 50%;
margin-left: 130px;
}
网友评论