在右边包含一个列表 [英] Wrap a list to the right

查看:110
本文介绍了在右边包含一个列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有如下列表:

<ul>
  <li>Alex</li>
  <li>James</li>
  <li>Thomas</li>
  <li>Is</li>
  <li>Asking</li>
  <li>Questions</li>
  <li>On</li>
  <li>Stackoverflow</li>
</ul>

默认值将显示为:

* Alex   
* James
* Thomas
* Is
* Asking
* Questions
* On
* Stackoverflow

我将使用什么CSS来显示如下:

What CSS would i use to get it to display like:

* Alex     * Questions
* James    * On
* Thomas   * Stackoverflow
* Is
* Asking

提前感谢...

推荐答案

对于现代浏览器

ul{
    -ms-column-count: 2;
    -o-column-count: 2;
    -moz-column-count: 2;
    -khtml-column-count: 2;
    column-count: 2;
    }

这篇关于在右边包含一个列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆