回复讨论(解决方案)
<style type="text/css"> ul{margin:0 auto;padding:0; width:400px;background:#F00; text-align:center; } li{ list-style:none; display:inline-block; margin:0 10px;width:100px; background:#0F0;}</style><ul> <li>1</li><li>2</li><li>3</li></ul>
纯css只有给li定宽度才行。 不然就只有用js去算了。
查看更多关于ul中的li如何居中均匀分布呢_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did108234