示例工程 06-text-typography

06-text-typography/demo-02-line-height/index.html

html · 1.0 KB

运行:行高与行宽

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>行高与行宽</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <h1>行高与行宽</h1>
    <p>同样的文字,不同的行高与最大宽度。</p>
    <section class="tight">
      <h2>行高 1.2</h2>
      <p>排版不是选一个漂亮字体。它决定读者读多快、读多久、会不会在第三段放弃。行高太紧,眼睛会累。</p>
    </section>
    <section class="normal">
      <h2>行高 1.75,68ch</h2>
      <p>排版不是选一个漂亮字体。它决定读者读多快、读多久、会不会在第三段放弃。行高与行宽一起决定阅读节奏。</p>
    </section>
    <section class="wide">
      <h2>行高 1.75,100%</h2>
      <p>排版不是选一个漂亮字体。它决定读者读多快、读多久、会不会在第三段放弃。行宽太宽,眼睛回行会迷路,读者容易跳行。</p>
    </section>
  </body>
</html>