如何使用HTML/CSS在段落行之间留出空格?

如何使用HTML/CSS在段落行之间留出空格?有几种方法可以在段落之间留出空间,我建议你使用html和css:

1.html的方法

<!DOCTYPE html>

<html>

<body>

​

<p>This is a paragraph.</p>

<p>This is a paragraph.</p>

<p>This is a paragraph.</p>

​

</body>

</html>

2 . CSS

<!DOCTYPE html>

<html>

<head>

<style>

p.small {

line-height: 0.7;

}

​

p.big {

line-height: 1.8;

}

</style>

</head>

<body>

​

<p>

This is a paragraph with a standard line-height.<br>

The default line height in most browsers is about 110% to 120%.<br>

</p>

​

<p class="small">

This is a paragraph with a smaller line-height.<br>

This is a paragraph with a smaller line-height.<br>

</p>

​

<p class="big">

This is a paragraph with a bigger line-height.<br>

This is a paragraph with a bigger line-height.<br>

</p>

​

</body>

</html>

发表评论

电子邮件地址不会被公开。 必填项已用*标注