我需要在列表中插入子列表,然后继续项目中的文本:
1. Start of the item text
- First item of sublist;
- Second item of sublist;
More text of the first item.
2. Second Item
3. Third item
Run Code Online (Sandbox Code Playgroud)
嵌套列表后面的文本在渲染后未正确对齐(应与“Start”对齐,与“1.”对齐)。有什么建议吗?
文本应与数字后面的文本左对齐,然后渲染的文本将与其对齐。
这是你的例子:
1. Start of the item text
- First item of sublist;
- Second item of sublist;
More text of the sublist of the first item.
The pending text of "More text of the sublist of the first item."
More text of the first item.
The pending text of "More text of the first item."
2. Second Item
3. Third item
Run Code Online (Sandbox Code Playgroud)
第一行文本有两个字符:文本内容前1 .有一个空格 Start of...
那么你要对齐的文本在文本内容之前也应该有3个空格 More text of...
此外,在文本内容之前有<=N 个空格(N 表示列表上下文的前缀文本的长度,在本例中,N=3)将使内容与该列表文本对齐
例如,有1 ~ 3 个空格将使文本与第一行文本对齐,有4 ~ 6 个空格将使文本与第二行文本对齐,
| 归档时间: |
|
| 查看次数: |
1291 次 |
| 最近记录: |