div+css布局绘制一个奥迪a7轿车效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局绘制一个奥迪a7轿车效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background-color: black; height: 100vh; display: flex; justify-content: center; align-items: center; } * { box-sizing: border-box; padding: 0; margin: 0; } .canvas { width: 60%; aspect-ratio: 1.5/1; position: relative; display: flex; justify-content: center; align-items: center; max-width: 570px; } .canvas * { position: absolute; } .window { height: 25%; width: 60%; top: 15%; } .window-frame-top { height: 25%; width: 85%; border-radius: 100%; border-top: 0.25vw solid rgba(255, 255, 255, 0.486); left: 50%; top: -5%; transform: translateX(-50%); } .window-frame-left { height: 100%; width: 30%; top: 10%; left: -7%; overflow: hidden; } .window-frame-left::after { content: ""; position: absolute; height: 310%; width: 100%; border-left: 0.3vw solid rgba(255, 255, 255, 0.815); border-radius: 100%; transform: rotate(25deg); top: -85%; left: 15%; } .window-frame-right { height: 100%; width: 30%; top: 10%; right: -7%; overflow: hidden; } .window-frame-right::after { content: ""; position: absolute; height: 310%; width: 100%; border-right: 0.3vw solid #ffffffd0; border-radius: 100%; transform: rotate(-25deg); top: -90%; right: 15%; } .window-frame-bottom { height: 15%; width: 100%; /* background-color: #ffffff; */ background-image: linear-gradient( to right, #fff, rgba(255, 255, 255, 0.267), #fff); left: 50%; transform: translateX(-50%); bottom: -20%; border-radius: 50% 50% 0 0; } .window-frame-bottom::after { content: ""; position: absolute; background-color: black; height: 200%; width: 100%; top: 4%; border-radius: 100%; } .bottom { height: 50%; width: 90%; /* background-color: #006eff23; */ top: 41%; border-radius: 30%; } .bottom::after { content: ""; position: absolute; height: 30%; width: 96.6%; background: linear-gradient(to right, #8080802c, black, #8080802c); left: 50%; transform: translateX(-50%); top: 22%; border-radius: 0 0 20% 20%; } .bottom-top { height: 5%; width: 16%; top: 10%; } .bottom-top-left { transform: rotate(-25deg); left: 1%; } .bottom-top-left::after { content: ""; position: absolute; height: 100%; width: 100%; clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 60%); background-color: #fff; } .bottom-top-left .adjust-1 { height: 90%; width: 45%; background-color: black; border-radius: 100%; z-index: 2; top: 58%; left: 0%; } .bottom-top-left .adjust-2 { height: 60%; width: 55%; background-color: black; background-color: red; background-color: #fff; border-radius: 100%; z-index: 1; top: 45%; right: 0%; } .bottom-top-left .adjust-3 { height: 60%; width: 45%; background-color: black; background-color: #fff; border-radius: 100%; z-index: 1; top: 15%; left: 0%; } .bottom-top-left .adjust-4 { height: 80%; width: 55%; background-color: black; border-radius: 100%; z-index: 1; top: -40%; right: -1%; transform: rota.........完整代码请登录后点击上方下载按钮下载查看
网友评论0