【发布时间】:2019-01-31 09:47:50
【问题描述】:
我一直在试图弄清楚如何在编号列表和文本之间放置空格,并且仍然让文本很好地环绕在它上面的行之下。我在 Stack Overflow 上找到了一些有效的脚本,但由于某种原因,我只能得到项目符号,没有数字。
谢谢。
ul {
margin: 0;
padding: 50;
}
/* The wider the #list_wrapper is, the more columns will fit in it */
#list_wrapper {
width: 1000px
}
/* The wider this li is, the fewer columns there will be */
ul.multiple_columns li {
text-align: right;
float: right;
list-style: decimal;
height: 30px;
width: 400px;
}
<form id="form1" runat="server">
<div>
<div id="list_wrapper">
<ul class="column-count: 2;">
<li>One: If I knew how to spell the ABC's I would write and write and write and write and write and write and write some more and write and write and write and write and write and write and write.</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
<li>Seven</li>
<li>Eight</li>
<li>Nine</li>
</ul>
</div>
</div>
</form>
【问题讨论】:
-
您正在尝试使用
ul中名为multiple_columns的类来选择li,但您的 HTML 中没有此类。 -
Azametin.. 谢谢,我为多列更改了“列计数”并取回了数字。不过,Totolly 把格式弄乱了。