Warm tip: This article is reproduced from stackoverflow.com, please click
css whitespace

Make whitespace bigger with CSS

发布于 2020-03-27 15:39:44

I have a font where the whitespaces are pretty small. I would like to make them bigger via CSS (instead of using multiple spaces for more room).

Is it possible to make whitespace bigger via CSS? Any other solutions if not?

Questioner
GDY
Viewed
17
33.2k 2020-01-31 16:18

word-spacing is probably what you're looking for.

Example from w3schools.com:

.a {
  word-spacing: normal;
}

.b {
  word-spacing: 30px;
}

.c {
  word-spacing: 1cm;
}
<h1>The word-spacing Property</h1>

<h2>word-spacing: normal:</h2>
<p class="a">This is some text. This is some text.</p>

<h2>word-spacing: 30px:</h2>
<p class="b">This is some text. This is some text.</p>

<h2>word-spacing: 1cm:</h2>
<p class="c">This is some text. This is some text.</p>