核心知识
字体与文本属性
字号、行高、字重和对齐共同决定长文本是否易读。
- font-family 按顺序寻找可用字体;本例英文用 Times New Roman,中文用宋体
- font-size:20px 设置字号;line-height:1.65 对本例20px文字产生33px行高
- 正文避免过小、过密或整段居中
<style>
body {
font-family: "Times New Roman", SimSun, serif;
font-size: 20px;
line-height: 1.65;
}
h1 {
font-family: "Times New Roman", SimHei, sans-serif;
font-weight: 700;
text-align: left;
}
</style>
<h1>黄梅戏分享会</h1><p>同一段文字,字号、行高和字重决定阅读体验。</p>