div+css布局一个卡通大胡子人物头部脸部效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局一个卡通大胡子人物头部脸部效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 10px;
}
@media only screen and (max-width: 600px) {
html {
font-size: 8px;
}
}
@media only screen and (max-width: 360px) {
html {
font-size: 6px;
}
}
body {
background-color: #aedfdb;
}
.container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.face {
width: 20rem;
height: 17rem;
background-color: #f7c19d;
border-radius: 45% 45% 0 0;
position: relative;
}
.beard {
position: relative;
width: 20rem;
height: 17rem;
background-color: #324c59;
border-radius: 0 0 50% 50%;
box-shadow: 0 3.5rem 0 0 #000;
display: flex;
justify-content: center;
}
.beard::before {
content: "";
position: absolute;
left: 50%;
top: 65%;
transform: translateX(-50%);
width: 14rem;
height: 12rem;
background-color: #e1796e;
border-radius: 0 0 50% 50%;
z-index: -10;
}
.beard::after {
content: "";
position: absolute;
left: 50%;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0