繁体   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