---
title: "css设置行间距"
author: "小丑鱼0703"
date: "2014-05-30T19:52:14Z"
tags: []
categories: ["Web前端"]
slug: "css"
draft: false
lastmod: "2014-05-30T19:52:14Z"
id: 2074380
url: "https://wangjingyi.iteye.com/blog/2074380"
---

line-height 属性设置行间的距离（行高）。
*不允许使用负值。

```css

<style type="text/css">
p.small {line-height: 0.5}
p.big {line-height: 2}
</style>
```



```html
<p>
这是拥有标准行高的段落。
默认行高大约是 1。
这是拥有标准行高的段落。
</p>
<p class="small">
这个段落拥有更小的行高。
这个段落拥有更小的行高。
</p>
<p class="big">
这个段落拥有更大的行高。
这个段落拥有更大的行高。
</p>
```



![](http://dl2.iteye.com/upload/attachment/0097/6622/61d03390-a9b3-3e0b-8f4e-7488f4e8b105.jpg)