Specifies the space between lines

This example demonstrates:

How to specify the space between lines in a paragraph.

Example analysis:

The line-height property is used to set the line height in percentage; not allowed negative value.

You can set the following values:

●Normal: Default value, set a reasonable line spacing.

● Number: Set a number. This number will be multiplied by the current font size to set the line spacing.

●length: Set a fixed line spacing.​

● %: Percent line spacing based on the current font size.


Continuing Learning
||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php(php.cn)</title>
<style>
p.small {line-height:70%;}
p.big {line-height:200%;}
</style>
</head>
<body>
<p>
<br>
<br>
110%120%<br>
</p>
<p class="small">
<br>
<br>
<br>
<br>
</p>
<p class="big">
<br>
<br>
<br>
<br>
</p>
</body>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
图片放大关闭