示例工程 06-text-typography
06-text-typography/demo-01-font-stack/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: 28px;
}
section {
margin-top: 14px;
padding: 14px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #ffffff;
}
h2 {
margin: 0 0 6px;
font-size: 14px;
color: #64748b;
letter-spacing: 0.08em;
}
section p {
margin: 0;
}
.system p {
font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.serif p {
font-family: Georgia, "Times New Roman", "Songti SC", serif;
font-size: 17px;
}
.mono p {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 14px;
}