CSS画卡通人物:皮卡丘

皮卡丘

CSS画卡通人物:皮卡丘_第1张图片



	
		
		Pikachu
		
	
	
		 

*{
	margin: 0;
	padding:0;
	box-sizing: border-box;
}
*::after{
	box-sizing:border-box;
}
*::before{
	box-sizing:border-box;
}
body{
	height: 100vh;
	border:1px solid green;
	display: flex;
	justify-content: center;
    align-items:center;
    background-color:#FEE433;
}
.wrapper{
	width: 400px;
	height: 320px;
	position: absolute;
}
.nose{
	width: 0px;
	height:0px;
	border: 13px solid;
	border-radius: 50%;
	border-color:black transparent transparent;
	position: relative;
	left:50%;
	top: 25%;
	transform: translateX(-50%); 
}
.eye{
	width: 50px;
	height: 50px;
	border-radius:50% ;
	background-color: #2E2E2E;
	border: 5px solid black;
	float: left;
	position: absolute;
}
.eye::before{
	content: "";
	display:block;
	width: 20px;
	height: 20px;
	border-radius:50%;
	background-color:white ;
	transform: translateX(2px) translateY(-1px);
}
.eye.left{
	position: relative;
	left:25%;
	transform: translateX(-50%) translateY(50%);
}
.eye.right{
	position: relative;
	left:50%;
	transform: translateX(50%) translateY(50%);
}
.face{
	width: 80px;
	height: 80px;
	border:2px solid red;
	border-radius:50% ;
	background-color: #FC0D1C;
	position: absolute;
    top:0;
    left:0;

}
.face.left{
	position:relative;
	top:60%;
	left: 15%;
	 transform: translateX(-50%) translateY(-50%);
}
.face.right{
	position:relative;
	top:60%;
	left: 85%;
	transform: translateX(-50%) translateY(-150%);
}
.lip{
	width: 80px;
	height: 24px;
	border:4px solid black;
	background-color:#FEE433;
	z-index: 1;
	position:absolute;
	top:40%;
	left:50%;
}
.lip.left{
	border-bottom-left-radius:50% 100%;
	border-top:none ;
	border-right: none;
	transform: translateX(-100%) translateY(-7px) rotate(-30deg) translateX(2px);
	
}
.lip.right{
	border-bottom-right-radius:50% 100%;
	border-top:none;
	border-left: none;
	transform: translateX(-2px) translateY(-7px) rotate(30deg);
}
.mouth{
	width: 100px;
	height: 480px;
	border:1px solid red;
	border-radius: 50% ;
	background-color:#990513 ;
	position:absolute ;
	top: -30%;
	left: 50%;
	transform: translateX(-50%) translateY(-50%);
	position: absolute;
	overflow: hidden;
}
.lowerlip{
	width: 280px;
	height: 200px;
	position:absolute ;
	top: 50%;
	left: 50%;
	transform: translateX(-50%) translateY(-18%);
	overflow: hidden;
}
.mouth::after{
	content: " ";
	display: block;
	width:150px;
	height: 150px;
	border-radius:50% ;
	background-color:#FC4A62 ;
    position: relative;
    top: 90%;
    transform:  translateX(-25px) translateY(-65%);

}

 

你可能感兴趣的:(web开发——作品,css,html,css3,html5)