css布局实现写代码的电脑桌窗外景色效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现写代码的电脑桌窗外景色效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> *, *::after, *::before { padding: 0; margin: 0; box-sizing: border-box; } body { background-color: #131b33; min-height: 100vh; display: flex; justify-content: center; align-items: flex-end; padding-top: 3rem; } .wrapper { display: flex; flex-direction: column; align-items: center; position: relative; } .window { border: 8px solid #232b43; width: 25rem; height: 18rem; display: grid; grid-template-columns: repeat(3, 1fr); } .window > div { overflow: hidden; background-color: #7b83e3; position: relative; } .window > div:first-child { border: 2px solid #8babfb; border-top: 0; border-bottom: 0; } .window > div:not(:first-child) { border-left: 6px solid #232b43; } .window__inner-1 { margin-top: 45%; height: 80%; border-top: 8px solid #53639b; background-color: #636bb3; position: relative; } .window__inner-1::after, .window__inner-1::before { content: ""; position: absolute; left: 0.5rem; top: 0; width: 3rem; height: 1.6rem; transform: translateY(-100%); background-color: #53639b; } .window__inner-1::before { left: 4rem; width: 3.2rem; height: 2rem; transform: translateY(-100%); background-color: #53639b; } .window__inner-1 .bottom-right { position: absolute; right: 0; width: 1rem; } .window__inner-1 .bottom-right--1 { top: 60%; background-color: #4b5393; border-top: 2px solid #3b4373; height: 0.5rem; } .window__inner-1 .bottom-right--2 { height: 3.1rem; bottom: 0; background-color: #4b5393; } .window__inner-1 .small-window { position: absolute; width: 80%; height: 80%; left: 10%; bottom: 0; background-color: #4b5393; } .window__inner-1 .small-window::after { content: ""; position: absolute; left: -5%; top: 0; width: 110%; height: 1rem; transform: translateY(-100%); border-radius: 4px; border-left: 2px solid #3b4373; border-bottom: 2px solid #3b4373; background-color: #53639b; } .window__inner-1 .top-square { width: 60px; height: 14px; position: absolute; top: 14px; left: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .window__inner-1 .top-square > div { background-color: #53639b; } .window__inner-1 .left-square { width: 14px; height: 20px; position: absolute; top: 30%; left: 0; background-color: #53639b; } .window__inner-2 { margin-top: 45%; height: 80%; border-top: 8px solid #53639b; background-color: #636bb3; position: relative; } .window__inner-2 .bottom-right { position: absolute; left: 0; width: 2rem; } .window__inner-2 .bottom-right--1 { top: 60.5%; background-color: #4b5393; border-top: 2px solid #3b4373; height: 0.5rem; position: relative; } .window__inner-2 .bottom-right--1::after, .window__inner-2 .bottom-right--1::before { content: ""; position: absolute; left: 0; width: 4px; height: 2rem; left: 0.2rem; background-color: #4b5393; } .window__inner-2 .bottom-right--1::after { left: 0.9rem; } .window__inner-2 .bottom-right--2 { height: 3rem; bottom: 0; background-color: #4b5393; } .window__inner-2 .big-window { position: absolute; width: 80%; height: 114%; right: 0; bottom: 0; background-color: #4b5393; padding-top: 10px; } .window__inner-2 .big-window.........完整代码请登录后点击上方下载按钮下载查看
网友评论0