如何设置列表项之间的垂直间隔? [英] How do I set vertical space between list items?

查看:145
本文介绍了如何设置列表项之间的垂直间隔?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<ul>元素中,可以使用line-height属性明确设置行之间的垂直间距.

Within a <ul> element, clearly the vertical spacing between lines can be formatted with the line-height attribute.

我的问题是,在<ul>元素内,如何设置列表项之间的垂直间距?

My question is, within a <ul> element, how do I set the vertical spacing between the list items?

推荐答案

您可以使用margin.参见示例:

You can use margin. See the example:

http://jsfiddle.net/LthgY/

li{
  margin: 10px 0;
}

这篇关于如何设置列表项之间的垂直间隔?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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