<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
各位,
我有一个新的要求来显示一个大的元素列表..比如说..
<ul>
<li>one</li>
<li>two</li>
.
.
<li>forty</li>
</ul>
这必须显示为 要么
one Four
two Five
three Six...........Forty
或者
one two three....
...
... Forty
我是这个 html/css 的新手。内联和其他一些修复程序不起作用。请帮助一些 jsfiddle 工作示例。
最佳答案
检查下面的 fiddle
CSS:
ul li {
list-style-type:none;
display:inline-block;
padding:5px 0;
margin:5px 2%;
background-color:red;
width:20%;
text-align:center;
}
关于html - 如何水平显示大元素列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34674134/