示例工程 54-layout-shell
54-layout-shell/demo-01-shell/style.css
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
body {
margin: 0;
background: #f8fafc;
color: #0f172a;
font-family: system-ui, sans-serif;
line-height: 1.7;
}
.shell {
display: grid;
grid-template-rows: auto 1fr auto;
min-height: 100vh;
min-height: 100dvh;
}
.header,
.footer {
display: flex;
align-items: center;
padding: 16px 24px;
border-bottom: 1px solid #e2e8f0;
background: #ffffff;
font-size: 14px;
}
.footer {
border-bottom: 0;
border-top: 1px solid #e2e8f0;
color: #64748b;
}
.main {
padding: 32px 24px;
}
h1 { margin: 0 0 4px; font-size: 26px; }
p { margin: 0; color: #64748b; font-size: 14px; }