示例工程 14-flex-alignment
14-flex-alignment/demo-01-justify/style.css
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
body {
margin: 0;
padding: 32px;
background: #f8fafc;
color: #0f172a;
font-family: system-ui, sans-serif;
line-height: 1.7;
}
h1 {
margin: 0 0 8px;
font-size: 26px;
}
h2 {
margin: 18px 0 6px;
font-size: 13px;
color: #64748b;
}
.stage {
display: flex;
gap: 8px;
padding: 8px;
border: 1px dashed #cbd5e1;
border-radius: 8px;
background: #ffffff;
}
.stage i {
display: grid;
place-items: center;
width: 56px;
height: 36px;
border-radius: 6px;
background: #2563eb;
color: #ffffff;
font-size: 12px;
font-style: normal;
}
.start { justify-content: flex-start; }
.between { justify-content: space-between; }
.evenly { justify-content: space-evenly; }