示例工程 15-flex-patterns
15-flex-patterns/demo-02-toolbar/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;
}
.bar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
padding: 8px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #ffffff;
}
.group {
display: flex;
gap: 8px;
}
.bar button {
min-height: 36px;
padding: 0 12px;
border: 1px solid #cbd5e1;
border-radius: 8px;
background: #ffffff;
font-size: 12px;
}
.bar .primary {
border-color: #2563eb;
background: #2563eb;
color: #ffffff;
}
.between {
justify-content: space-between;
}
.gap {
flex: 1 1 auto;
}