文字排版
引註
句子中指向資料來源的小型編號標記。
本頁內容
引註是放在論述末尾的小型編號標記,指向該論述的來源。連結採用膠囊標籤的底色與圓弧外形,比正文稍小,也略高於基線。指標移到標記上或來源正在顯示時,標記的底色會變成墨色。
引註
<div class="max-w(480) mx-auto text-sm fg-text-body leading-md"> <p class="m(0)"> Corners are drawn as squircles where the browser has <code class="code">corner-shape</code><button type="button" class="citation" popovertarget="source-1" aria-label="Source 1">1</button><span class="popover" id="source-1" popover> <span class="flex flex-col gap-xs"> <span class="fg-text-strong font-medium"> CSS Borders and Box Decorations Module Level 4 </span><span class="fg-text-muted text-xs">W3C Working Draft · w3.org</span> </span> </span> and as circles elsewhere, with the radius scaled so both look equally round.<a class="citation" href="#ref-2" aria-label="Source 2">2</a><a class="citation" href="#ref-3" aria-label="Source 3">3</a> </p> <ol class="mt-md pl-md text-xs fg-text-muted"> <li>CSS Borders and Box Decorations Module Level 4</li> <li id="ref-2">Master UI theme guide, “Continuous corners”</li> <li id="ref-3">Figma, “Desperately seeking squircles”</li> </ol></div><div className="max-w(480) mx-auto text-sm fg-text-body leading-md"> <p className="m(0)"> Corners are drawn as squircles where the browser has <code className="code">corner-shape</code><button type="button" className="citation" popoverTarget="source-1" aria-label="Source 1"> 1 </button><span className="popover" id="source-1" popover=""> <span className="flex flex-col gap-xs"> <span className="fg-text-strong font-medium"> CSS Borders and Box Decorations Module Level 4 </span><span className="fg-text-muted text-xs">W3C Working Draft · w3.org</span> </span> </span> and as circles elsewhere, with the radius scaled so both look equally round.<a className="citation" href="#ref-2" aria-label="Source 2">2</a><a className="citation" href="#ref-3" aria-label="Source 3">3</a> </p> <ol className="mt-md pl-md text-xs fg-text-muted"> <li>CSS Borders and Box Decorations Module Level 4</li> <li id="ref-2">Master UI theme guide, “Continuous corners”</li> <li id="ref-3">Figma, “Desperately seeking squircles”</li> </ol></div><div class="max-w(480) mx-auto text-sm fg-text-body leading-md"> <p class="m(0)"> Corners are drawn as squircles where the browser has <code class="code">corner-shape</code><button type="button" class="citation" popovertarget="source-1" aria-label="Source 1">1</button><span class="popover" id="source-1" popover> <span class="flex flex-col gap-xs"> <span class="fg-text-strong font-medium"> CSS Borders and Box Decorations Module Level 4 </span><span class="fg-text-muted text-xs">W3C Working Draft · w3.org</span> </span> </span> and as circles elsewhere, with the radius scaled so both look equally round.<a class="citation" href="#ref-2" aria-label="Source 2">2</a><a class="citation" href="#ref-3" aria-label="Source 3">3</a> </p> <ol class="mt-md pl-md text-xs fg-text-muted"> <li>CSS Borders and Box Decorations Module Level 4</li> <li id="ref-2">Master UI theme guide, “Continuous corners”</li> <li id="ref-3">Figma, “Desperately seeking squircles”</li> </ol></div><template> <div class="max-w(480) mx-auto text-sm fg-text-body leading-md"> <p class="m(0)"> Corners are drawn as squircles where the browser has <code class="code">corner-shape</code><button type="button" class="citation" popovertarget="source-1" aria-label="Source 1"> 1 </button><span class="popover" id="source-1" popover> <span class="flex flex-col gap-xs"> <span class="fg-text-strong font-medium"> CSS Borders and Box Decorations Module Level 4 </span><span class="fg-text-muted text-xs">W3C Working Draft · w3.org</span> </span> </span> and as circles elsewhere, with the radius scaled so both look equally round.<a class="citation" href="#ref-2" aria-label="Source 2">2</a><a class="citation" href="#ref-3" aria-label="Source 3">3</a> </p> <ol class="mt-md pl-md text-xs fg-text-muted"> <li>CSS Borders and Box Decorations Module Level 4</li> <li id="ref-2">Master UI theme guide, “Continuous corners”</li> <li id="ref-3">Figma, “Desperately seeking squircles”</li> </ol> </div></template>第一個標記會在彈出面板中顯示來源,其餘標記會跳到來源清單。
#引註指向的位置
引註可指向下列兩個位置,兩種做法都無須腳本。
- 來源清單通常放在回答或文章末尾。標記是
<a>,其href指向來源條目的 ID。 - 彈出面板 會顯示來源標題及出處。引註標記是帶有
popovertarget的<button>,彈出面板須緊接在按鈕之後。面板開啟時,引註標記會維持填色。在段落內請用<span>作為彈出面板,因為段落不能包含<div>。
標記前面請省略空格。它是行內元素,換行時會跟著前面的字詞,避免單獨出現在行首。
#無障礙
- 單獨的數字無法說明標記的用途。請為每個標記加上
aria-label,例如「來源 2」,也可以直接使用來源標題。 - 讓讀者無須操作引註標記也能查看來源。可快速瀏覽的來源清單比逐一開啟十幾個彈出面板方便。
- 標記雖小,仍以控制項的字重顯示等寬數字,點按範圍也會隨所在文字的大小增加。
#類別
| 類別 | 說明 |
|---|---|
citation | 標記可使用 href 指向來源 id 的 <a>,或使用帶有 popovertarget 的 <button>,並將按鈕緊接在對應的 popover 前面。請加上 aria-label,例如「來源 2」。 |