div+css布局实现动漫人物头像效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现动漫人物头像效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
.kamado {
--s:#f8d7b6;
width: min(100vmin,445px);
aspect-ratio:1;
margin:auto auto 0;
position: relative;
overflow: hidden;
z-index: 0;
}
.kamado:after {
content: "";
position: absolute;
width: 2.4%;
height: 4%;
background: #d29785;
left: 47.6%;
top: 69%;
border-radius: 75% 25% 34% 66% / 60% 19% 81% 40%;
clip-path: polygon(0% 50%,65% 0,100% 0,100% 100%,0 100%);
}
.kamado:before {
content: "";
position: absolute;
right: 22%;
top: 37%;
width: 28%;
height: 12%;
background:
linear-gradient(#6e293c 0 0) 100% 42%/16% 9%,
radial-gradient(102% 102% at 0 100%,#0000 97%,#6e293c) 100% 59%/27% 23%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 39% 74%/13% 19%,
linear-gradient(to bottom right,#0000 30%,var(--s) 34% 65%,#0000 70%)71% 79%/57% 35%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 44% 74%/14% 64%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 59% 67%/11% 29%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 78% 54%/18% 26%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 27% 100%/10% 33%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 40% 40%/16% 42%;
background-repeat: no-repeat;
z-index: 1;
transform: skewX(-42deg);
}
.face {
position: absolute;
inset: 28% 22% 47% 23.5%;
background:
linear-gradient(var(--s) 0 0) 63% 80%/10% 10%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 50% 77%/8% 34%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 84% 20%/10% 12%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 78% 11%/8% 10%,
linear-gradient(to bottom right,var(--s) 48%,#0000 52%) 58% 43%/8% 9%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 62% 3%/7% 8%,
linear-gradient(to bottom right,var(--s) 48%,#0000 52%) 57% 39%/7% 32%,
linear-gradient(to bottom right,var(--s) 49%,#0000 51%) 61% 0%/10% 32%,
radial-gradient(farthest-side,var(--s) 96%,#0000) 60% 26%/7% 20%,
conic-gradient(from 9deg at 51% 82%,#6e293c 66deg,#0000 0),var(--s);
background-repeat:no-repeat;
border-radius: 40% 40% 0 0/89% 84% 0 0;
filter: drop-shadow(0 0 1px #20101b) drop-shadow(0 0 0px #20101b) drop-shadow(0 0 0px #20101b)
}
.face div {
position: absolute;
inset: 98% 0 -157%;
background:
linear-gradient(#422102 0 0) 49% 46%/1px 5%,
linear-gradient(#422102 0 0) 52% 46%/1px 6%.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0