gpt4 book ai didi

html - 停止列表中的文本换行

转载 作者:搜寻专家 更新时间:2023-10-31 22:17:20 25 4
gpt4 key购买 nike

我有一个有序列表:

<ol>
<li>They used to bring concerns about their children or their marriages. But increasingly parishioners are also telling Glen VanderKloot, a Lutheran minister in Springfield, Ill., about their financial worries, and that puts him in the unusual position of dispensing investment advice.</li>
<li>This is the Second g</li>
<li>This is the Third g</li>
<li>This is the fourth g</li>
<li> <strong>This is the fifth g</strong> </li>
<li>This is the seventh g</li>
<li>This is the eight g</li>
<li>This is the ninth g</li>
<li>This is the tenth g</li>
<li>This is the eleventh g</li>
<li>This is the twelvth g</li>
</ol>

显示如下:

1.  They used to bring concerns about their children or their marriages. But
increasingly parishioners are also telling Glen VanderKloot, a Lutheran
minister in Springfield, Ill., about their financial worries, and that puts
him in the unusual position of dispensing investment advice.
2. This is the Second g
3. This is the Third g
4. This is the fourth g
5. This is the fifth g
6. This is the seventh g
7. This is the eight g
8. This is the ninth g
9. This is the tenth g
10. This is the eleventh g
11. This is the twelvth g

当我有很多像第一项这样的文本时,我希望它的格式像上面那样。我能够通过设置来完成此操作:

list-style-position:outside;

并调整 li 和 ol 标签上的一些边距。但是,当我有两位数和三位数时,这会产生一些不利影响。我不得不使用这些边距,因为在 IE 中数字被截断了。我希望能够返回使用 insidelist-style-position 并删除边距,但文本在数字下换行,这不是我想要的.

有谁知道如何关闭这种包装?

最佳答案

试试这个:

li { 
white-space:nowrap;
}

关于html - 停止列表中的文本换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/677655/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com