纯css绘制佛莱迪·摩克瑞人物效果
代码语言:html
所属分类:布局界面
代码描述:纯css绘制佛莱迪·摩克瑞人物效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
/* Generic */
body {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: flex-end;
overflow: hidden;
background-image: linear-gradient(135deg, #070437, black);
}
.main {
position: relative;
width: 60vw;
height: 45vw;
}
.filter {
position: absolute;
width: 100%;
height: 100%;
background-image: linear-gradient(110deg, #04021f 32%, transparent 50%);
z-index: 4000;
}
.light {
position: absolute;
top: 0;
left: 50vw;
width: 50vw;
height: 100vh;
z-index: 2000;
transform: skewX(20deg) translate(-30%);
background-image: linear-gradient(to bottom, rgba(236, 232, 214, 0.15), rgba(236, 232, 214, 0.035), transparent);
filter: blur(2vw);
z-index: 5000;
}
@media (max-width: 600px) {
.light {
left: 30vw;
width: 70vw;
}
}
.micro-a {
position: absolute;
top: 10.5vw;
right: 27vw;
height: 5vw;
width: 5vw;
border-radius: 50%;
border-top: 0.2vw solid #ECE8D6;
background-image: linear-gradient(to bottom, #070437, #010107);
z-index: 50;
}
.micro-b {
position: absolute;
top: 12vw;
right: 30vw;
height: 2.8vw;
width: 15vw;
background-image: linear-gradient(-5deg, #010107, #070437 3.3vw, #ECE8D6 3.3vw, #ECE8D6 3.5vw, transparent 3.5vw);
border-top-left-radius: 1vw;
border-bottom-left-radius: 1vw;
}
.face {
position: absolute;
right: 7vw;
top: 6.5vw;
width: 21vw;
height: 17vw;
z-index: 50;
}
.face-i {
position: absolute;
transform-origin: bottom right;
}
.face-i:nth-of-type(1) {
top: 0.1vw;
right: 1.2vw;
width: 4vw;
height: 2.4vw;
transform: skewX(55deg);
background-image: linear-gradient(to bottom, #ECE8D6 0.6vw, #E1006D 0.6vw);
border-right: 0.3vw solid #a70659;
z-index: 100;
}
.face-i:nth-of-type(2) {
top: 2.4vw;
right: -.2vw;
width: 4.4vw;
height: 1.6vw;
transform: skewX(45deg);
background-image: linear-gradient(45deg, #C30065 0.6vw, #E1006D 0.6vw);
border-right: 0.3vw solid #a70659;
z-index: 100;
}
.face-i:nth-of-type(3) {
top: 4vw;
right: 0vw;
width: 4.5vw;
height: 1.6vw;
transform: skewX(-10deg);
background-color: #C30065;
border-right: 0.3vw solid #a70659;
z-index: 100;
}
.face-i:nth-of-type(4) {
top: 5.6vw;
right: 6.3vw;
width: 4.5vw;
height: 9vw;
transform: skewX(-35deg);
overflow: hidden;
background-color: #E1006D;
z-index: 100;
}
.face-i:nth-of-type(4)::before {
content: '';
position: absolute;
bottom: 0;
right: 0;
width: 80%;
height: 100%;
transform-origin: top right;
transform: skewY(35deg);
background-color: #aa0058;
}
.face-i:nth-of-type(4)::after {
content: '';
position: absolute;
bottom: 20%;
left: 10%;
width: 30%;
height: 100%;
transform-origin: bottom right;
transform: skewX(-20deg) skewY(-50deg);
background-color: #aa0058;
}
.face-i:nth-of-type(5) {
top: 1.7vw;
right: 9.6vw;
width: 7vw;
height: 12.9vw;
transform: skewX(-30deg);
overflow: hidden;
background-color: #E1006D;
}
.face-i:nth-of-type(5)::before {
content: '';
position: absolute;
bottom: 40%;
right: -20%;
width: 90%;
height: 15%;
transform-origin: top right;
transform: skewX(-30deg);
background-color: #C30065;
}
.face-i:nth-of-type(6) {
top: 0.1vw;
right: 5.4vw;
width: 4vw;
height: 1vw;
transform: skewX(-40deg);
border-left: 0.8vw solid #ECE8D6;
background-image: linear-gradient(to bottom, #ECE8D6 0.6vw, #E1006D 0.6vw);
}
.face-i:nth-of-type(7) {
top: 1vw;
right: 8.3vw;
width: 5.2vw;
height: 1.5vw;
transform: skewX(10deg);
border-top-left-radius: 0.4vw;
border-top: 0.15vw solid #ECE8D6;
border-left: 0.2vw solid #ECE8D6;
back.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0