示例工程 30-tables-lists
30-tables-lists/demo-02-lists/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: 20px 0 6px;
font-size: 13px;
color: #64748b;
}
ul, ol, dl { margin: 0; }
.check {
padding-inline-start: 1.25rem;
font-size: 14px;
}
.check li { padding: 3px 0; }
.check li::marker {
content: "✓ ";
color: #2563eb;
font-weight: 700;
}
.steps {
padding: 0;
list-style: none;
counter-reset: step;
display: grid;
gap: 8px;
font-size: 14px;
}
.steps li {
display: flex;
align-items: center;
gap: 8px;
counter-increment: step;
}
.steps li::before {
content: counter(step);
display: grid;
place-items: center;
width: 26px;
height: 26px;
border-radius: 50%;
background: #eff6ff;
color: #2563eb;
font-size: 11px;
font-weight: 700;
}
dl {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
gap: 4px 16px;
font-size: 14px;
}
dt {
font-weight: 600;
font-family: ui-monospace, monospace;
}
dd { margin: 0; color: #64748b; }
.nested {
padding-inline-start: 1.25rem;
font-size: 14px;
}
.nested ul {
padding-inline-start: 1.25rem;
color: #64748b;
}