示例工程 11-blockquote-cite

11-blockquote-cite/demo-02-figure/index.html

html · 1.9 KB

运行:figure 与引用

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

<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>figure 与引用</title>
    <style>
      body { margin: 0; padding: 32px; background: #f8fafc; color: #0f172a; font-family: system-ui, sans-serif; line-height: 1.75; }
      .box { max-width: 720px; margin-bottom: 16px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
      h1 { margin: 0 0 16px; font-size: 28px; }
      h2 { margin: 0 0 8px; font-size: 17px; }
      p { margin: 0 0 10px; color: #334155; }
      a { color: #2563eb; }
      figure { margin: 10px 0; padding: 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
      blockquote { margin: 0; padding: 0 0 0 14px; border-left: 3px solid #2563eb; color: #1e3a8a; }
      blockquote p { margin: 0; color: inherit; }
      figcaption { margin-top: 10px; color: #64748b; font-size: 13px; }
      .pull { margin: 0; padding: 18px; border: 0; border-top: 3px solid #0f172a; border-bottom: 3px solid #0f172a; font-size: 22px; line-height: 1.5; color: #0f172a; }
    </style>
  </head>
  <body>
    <h1>figure 与引用</h1>

    <div class="box">
      <h2>引用 + 署名作为整体</h2>
      <figure>
        <blockquote cite="source.html">
          <p>结构正确,内容清楚,可访问,才算完成。</p>
        </blockquote>
        <figcaption>
          —— <cite>林小满</cite>,<a href="source.html">访谈原文</a>
        </figcaption>
      </figure>
    </div>

    <div class="box">
      <h2>拉引(pull quote)</h2>
      <figure>
        <blockquote class="pull" cite="source.html">
          <p>引用是承诺:点了要能到,内容要对得上。</p>
        </blockquote>
        <figcaption>—— <cite>链接写作规范</cite></figcaption>
      </figure>
      <p>拉引是视觉强调,仍然要有出处。</p>
    </div>
  </body>
</html>