css布局实现曼达洛人头盔效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现曼达洛人头盔效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--gray: #403a3a;
--black: #121011;
}
body {
background: var(--black);
margin: 0;
padding: 0;
font-family: Mandalore, sans-serif;
box-sizing: border-box;
}
.container {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100%;
flex-direction: column;
}
.casco-top {
background: var(--gray);
width: 150px;
height: 75px;
border-radius: 100px 100px 0 0;
box-shadow: inset 0px 3px 3px grey, inset 21px 0 0px rgb(18 16 17 / 87%);
position: relative;
}
.casco-top:before {
content: "";
top: 20px;
right: 10px;
width: 38px;
height: 30px;
background: rgb(128 128 128 / 29%);
border-radius: 50%;
position: absolute;
transform: rotate(48deg);
}
.rayas-casco {
background: var(--gray);
height: 120%;
width: 30px;
border-radius: 4px 4px 13px 13px;
position: absolute;
left: 50%;
z-index: 1;
transform: translate(-50%);
border-left: 4px solid var(--black);
border-bottom: 4px solid var(--black);
border-right: 4px solid var(--black);
box-shadow: inset -2px 0 0 gray;
}
.rayas-casco:after {
content: "";
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%);
width: 8px;
height: 90%;
background: var(--gray);
border-left: 4px solid var(--black);
border-bottom: 4px solid var(--black);
border-right: 4px solid var(--black);
box-shadow: inset -4px 0 0 gray;
}
.linea {
width: 153px;
height: 4px;
background: var(--gray);
margin-top: 3px;
border-radius: 30px;
box-shadow: inset 2px 0px 1px gray, inset 22px 0 0 rgb(18 16 17 / 87%);
}
.cara {
width: 150px;
height: 120px;
background: var(--gray);
margin-top: 3px;
position: relative;
}
.visor {
width: 90%;
height: 13px;
background: var(--black);
position: absolute;
left: 50%;
top: 7px;
transform: translate(-50%);
}
.visor:after {
content: "";
position: absolute;
right: 0;
width: 51%;
top: 6px;
transform: rotate(-12deg);
height: 12px;
background: var(--black);
box-shadow: 0 2.3px 0 gray;
border-top-right-radius: 10px;
}
.visor:before {
content: "";
position: absolute;
left: 0;
top: 6px;
transform: rotate(12deg);
width: 51%;
height: 12px;
background: var(--black);
box-shadow: 0 2.3px 0 gray;
border-top-left-radius: 10px;
}
.reflejo {
height: 5px;
border-top: 0 solid transparent;
border-left: 30px solid #8080809c;
border-bottom: 5px solid transparent;
position: absolute;
right: 18px;
top: 5px;
z-index: 99;
}
.reflejo:before {
content: "";
position: absolute;
width: 4px;
height:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0