如何用纯CSS画出一个哆啦A梦?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>哆啦A梦</title>
<style>
*{
margin:0;padding:0;
}
section{
width:600px;
height:800px;
margin:100px auto;
position:relative;
}
#head{
width:400px;
height:400px;
background:#08bbe6;
border-radius:200px;
margin:0 auto;
border:2px solid #000;
position:relative;
}
.face{
width:320px;
height:240px;
background:#fff;
border-radius:120px;
position:absolute;
top:130px;
left:39px;
border:2px solid #000;
}
#neck{
width:300px;
height:30px;
background:#b93300;
border-radius:15px;
position:absolute;
left:149px;
top:340px;
border:2px solid #000;
z-index: 1
}
.bell{
width:50px;
height:50px;
background:#e1d916;
border:2px solid #000;
border-radius:25px;
position:absolute;
left:125px;
top:10px;
}
.bellLine{
width:44px;
height:3px;
border:2px solid #000;
position:absolute;
left:128px;
top:22px;
}
.blackDot{
width:20px;
height:20px;
background:#000;
border-radius:10px;
position:absolute;
left:142px;
top:32px;
}
.backLine{
width:3px;
height:10px;
background:#000;
position:absolute;
left:151px;
top:52px;
}
.eyeOne{
width:90px;
height:100px;
background:#fff;
border-radius:43px;
border:1px solid #000;
position:absolute;
left:110px;
top:80px;
}
.eyeTwo{
width:90px;
height:100px;
background:#fff;
border-radius:43px;
border:1px solid #000;
position:absolute;
left:200px;
top:80px;
}
.eyeball{
width:30px;
height:30px;
background:#000;
border-radius:15px;
position:absolute;
left:30px;
top:70px;
}
.nose{
width:40px;
height:40px;
background:#ca3e01;
border-radius:20px;
border:1px solid #000;
position:absolute;
left:139px;
top:35px;
}
.mouthLine{
width:4px;
height:105px;
background:#000;
position:absolute;
left:158px;
top:76px;
}
.mouth{
width:150px;
height:50px;
border-bottom:3px solid #000;
border-radius:0 0 75px 75px/0 0 50px 50px;
position:absolute;
left:85px;
top:130px;
}
#body{
width:280px;
height:200px;
background:#08bbe6;
position:absolute;
left:159px;
top:372px;
border:2px solid #000;
border-top:0;
}
.tummy{
width:200px;
height:150px;
background:#fff;
border-radius:0 0 100px 100px;
position:absolute;
left:39px;
top:-10px;
border:2px solid #000;
border-top:0;
}
.bag{
width:150px;
height:80px;
border:2px solid #000;
border-radius:0 0 75px 75px;
position:absolute;
left:24px;
top:50px;
}
.ban{
width:30px;
height:16px;
background:#fff;
border:2px solid #000;
border-bottom:0;
border-radius:16px 16px 0 0;
position:absolute;
left:85px;
top:194px;
}
.legOne{
width:160px;
height:40px;
background:#fff;
border:2px solid #000;
border-radius:27px 20px 20px 15px;
position:absolute;
left:-24px;
top:200px;
}
.legTwo{
width:160px;
height:40px;
background:#fff;
border:2px solid #000;
border-radius:20px 27px 15px 20px;
position:absolute;
right:-29px;
top:200px;
}
.armOne{
width:80px;
height:40px;
background:#08bbe6;
border:2px solid #000;
position:absolute;
left:-40px;
top:30px;
border-radius:20px 0 0 20px;
}
.armTwo{
width:80px;
height:40px;
background:#08bbe6;
border:2px solid #000;
position:absolute;
right:-43px;
top:30px;
border-radius:0 20px 20px 0;
}
.handOne{
width:60px;
height:60px;
background:#fff;
border:2px solid #000;
position:absolute;
left:35px;
top:20px;
border-radius:30px;
}
.handTwo{
width:60px;
height:60px;
background:#fff;
border:2px solid #000;
position:absolute;
right:32px;
top:20px;
border-radius:30px;
}
#heart{
width:150px;
height:150px;
position:absolute;
left:242px;
top:370px;
z-index:1;
transform: scale(0.9);
}
#heart:before {
content: "";
position:absolute;
top: 0;
left: 60px;
width: 80px;
height: 140px;
background-color: red;
border-radius: 150px 150px 0 0 ;
transform: rotate(-45deg);
transform-origin:0 100%;
}
#heart:after {
content: "";
position:absolute;
top: 0;
right: 90px;
width: 80px;
height: 140px;
background-color: red;
border-radius: 150px 150px 0 0 ;
transform: rotate(45deg);
transform-origin: 100% 100%;
}
#heart {
animation-name:heartbeat;
animation-duration:2000ms;
animation-timing-function:cubic-bezier(0,0,0,1.74);
animation-delay:500ms;
animation-iteration-count:infinite;
animation-play-state:running;
}
@keyframes heartbeat{
0%{transform: scale(0.95);}
50%{transform: scale(1);}
100%{transform: scale(0.95);}
}
</style>
</head>
<body>
<section>
<div id="head">
<div class="face">
<div class="nose"></div>
<div class="mouthLine"></div>
<div class="mouth"></div>
</div>
<div class="eyeOne">
<div class="eyeball"></div>
</div>
<div class="eyeTwo">
<div class="eyeball"></div>
</div>
</div>
<div id="neck">
<div class="bell"></div>
<div class="bellLine"></div>
<div class="blackDot"></div>
<div class="backLine"></div>
</div>
<div id="body">
<div class="tummy">
<div class="bag"></div>
<div class="ban"></div>
</div>
<div class="legOne"></div>
<div class="legTwo"></div>
<div class="armOne"></div>
<div class="armTwo"></div>
<div class="handOne"></div>
<div class="handTwo"></div>
</div>
<div id="heart"></div>
</section>
</body>
</html>
效果图如下: