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: 7px; background: var(--black); left: -10px; top: 0; transform: rotate(5deg); } .reflejo:after { content: ""; position: absolute; width: 4px; height: 7px; background: var(--black); left: -33px; top: 0; transform: rotate(15deg); } .visor-abajo { width: 23px; height: 75%; background: var(--black); position: absolute; left: 50%; bottom: 0; transform: translate(-50%); box-shadow: 2.3px 0 0 gray, -2.3px 0 0 gray; } .visor-abajo:before { content: ""; position: absolute; width: 20px; height: 20px; top: -15px; background: var(--black); } .visor-abajo:after { content: ""; position: absolute; width: 25px; height: 25px; background: var(--black); bottom: -13px; left: 50%; transform: translate(-50%) rotate(45deg); } .circulo-1 { position: absolute; left: 0; bottom: 0; background: #121011; width: 38%; height: 78%; border-radius: 0 100px 0 0; } .circulo-1:before { content: ""; position: absolute; bottom: 0; right: 5px; width: 70%; height: 45%; background: var(--gray); border-radius: 0 100px 0 0; transform: skew(350deg, 25deg) rotate(2deg) translatey(-10px); } .circulo-1:after { content: ""; position: absolute; top: 10px; left: 0; border-rigth: 50px solid transparent; border-top: 20px solid transparent; border-le.........完整代码请登录后点击上方下载按钮下载查看
网友评论0