簡體   English   中英

我該如何復制 <ol><li> HTML中的項目符號列表帶有正確對齊的縮進?

[英]How can I replicate a <ol><li> bullet list in HTML with indents that line up correctly?

我需要一個HTML字母項目符號列表,該列表會經常使用。 Google網站不支持此功能,我一直都在工作。...您可以手動復制HTML項目符號列表嗎?

到目前為止,我的縮進不匹配,因為我使用的是固定邊距,並且字母字符都具有唯一的像素尺寸:

 <div style="display:inline"> <b style="text-align:left">Enter your list title here</b> <span style="display:block;margin-left:40px"> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">a.</b>Enter your list description here</p> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">b.</b>Enter your list description here</p> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">c.</b>Enter your list description here</p> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">d.</b>Enter your list description here</p> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">e.</b>Enter your list description here</p> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">f.</b>Enter your list description here</p> <p style="font-size:0.85em;font-weight:normal"><b style="margin-right:1em">g.</b>Enter your list description here</p> </span> </div> 

 <ol type="a"> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> </ol> 

順序列表已經支持各種定義列表的方法(數字,字母,羅馬數字等)。 也可以使用CSS list-style-type進行修改。

https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/ol

https://developer.mozilla.org/zh-CN/docs/Web/CSS/list-style-type

由於Google協作平台有一些限制,因此我不確定您是使用HTML Box還是編輯Google Page的HTML源 ,但是可以使用具有以下語法的HTML style attribute

 <ol style="list-style-type:lower-alpha"> <li>item1</li> <li>item2</li> <li>item3</li> <li>item4</li> </ol> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM