示例工程 06-text-typography
06-text-typography/demo-02-line-height/style.css
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
body {
margin: 0;
padding: 32px;
background: #f8fafc;
color: #0f172a;
font-family: system-ui, sans-serif;
font-size: 16px;
}
h1 {
margin: 0 0 8px;
font-size: 28px;
}
section {
margin-top: 14px;
padding: 14px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #ffffff;
}
h2 {
margin: 0 0 6px;
font-size: 13px;
color: #64748b;
}
section p {
margin: 0;
color: #334155;
}
.tight p {
line-height: 1.2;
}
.normal p {
max-width: 68ch;
line-height: 1.75;
}
.wide p {
line-height: 1.75;
}