带项目符号左对齐和悬挂缩进的项目符号列表
Bulleted List with bullet flush left and Hanging Indent
我正在寻找编写项目符号列表的正确方法,在 html 或 markdown 中,项目符号在左侧齐平,项目符号后面有一个制表符 space,并且正下方有一个悬挂缩进项目符号线。我试过将它与 spaces 和各种列表一起破解,但没有什么看起来不错。有什么建议吗?
我试着让它看起来像这样:
这是我的清单
∙ 第一行
第二行
这需要一个分为两部分的解决方案:
使用 Markdown 语义表示多行列表项。
根据 "Line Two" 应该是一个新段落还是只是一个新行,您可以使用
* Line one
␣␣␣␣New paragraph
或
* Line one␣␣
New line
其中 ␣
表示 space.
按照您希望的方式设置此列表的样式。项目符号前后的间距纯粹是为了美观,不能在 Markdown 中表示。
CSS 样式应按照以下方式执行:
ul {
/* Make bullet left-flush, value chosen by experimentation */
padding-left: 10px;
}
ul li {
/* Add padding to list item, which amounts to space between the
bullet and the text */
padding-left: 1.5em;
}
<!-- Generated by Markdown -->
<ul>
<li>Line one<br>
New line</li>
</ul>
ul {
/* Make bullet left-flush, value chosen by experimentation */
padding-left: 10px;
}
ul li {
/* Add padding to list item, which amounts to space between the
bullet and the text */
padding-left: 1.5em;
}
<!-- Generated by Markdown -->
<ul>
<li>Line one<br>
New line</li>
</ul>
我正在寻找编写项目符号列表的正确方法,在 html 或 markdown 中,项目符号在左侧齐平,项目符号后面有一个制表符 space,并且正下方有一个悬挂缩进项目符号线。我试过将它与 spaces 和各种列表一起破解,但没有什么看起来不错。有什么建议吗?
我试着让它看起来像这样:
这是我的清单
∙ 第一行
第二行
这需要一个分为两部分的解决方案:
使用 Markdown 语义表示多行列表项。
根据 "Line Two" 应该是一个新段落还是只是一个新行,您可以使用
* Line one ␣␣␣␣New paragraph
或
* Line one␣␣ New line
其中
␣
表示 space.按照您希望的方式设置此列表的样式。项目符号前后的间距纯粹是为了美观,不能在 Markdown 中表示。
CSS 样式应按照以下方式执行:
ul { /* Make bullet left-flush, value chosen by experimentation */ padding-left: 10px; } ul li { /* Add padding to list item, which amounts to space between the bullet and the text */ padding-left: 1.5em; }
<!-- Generated by Markdown --> <ul> <li>Line one<br> New line</li> </ul>
ul {
/* Make bullet left-flush, value chosen by experimentation */
padding-left: 10px;
}
ul li {
/* Add padding to list item, which amounts to space between the
bullet and the text */
padding-left: 1.5em;
}
<!-- Generated by Markdown -->
<ul>
<li>Line one<br>
New line</li>
</ul>