Home>Article>Web Front-end> How to adjust css font spacing? How to adjust css text spacing

How to adjust css font spacing? How to adjust css text spacing

不言
不言 Original
2018-10-08 11:35:26 8945browse

In the process of front-end development, sometimes words may appear to be relatively compact, which will make the page look unsightly. So how to solve this problem? We should be able to think of setting the text spacing throughcssto make the distance between words larger. This will be more in line with the design of the page layout and make the page more beautiful. Then, the following This article will introduce to you the method ofcss font spacing adjustment. Friends in need can refer to it.

The way to solve the spacing between words in css is to use the css style attribute letter-spacing. The letter-spacing attribute is used to adjust the spacing between words, that is, the distance between characters.

Let’s take a look directly at the usage of the css text spacing attribute letter-spacing.

For example, letter-spacing:20px; sets the distance between words to 15px.

css font spacing adjustment code:

   

php中文网文字间隔

css font spacing adjustmentThe effect is as follows:

How to adjust css font spacing? How to adjust css text spacing

Note: If setting the word spacing has no effect, check whether the div is at the wrong level; we can also set the line spacing through line-height.

The above is the entire content of this article. For more information about the css text spacing attribute letter-spacing, you can refer tocss User Manualfor further learning.

The above is the detailed content of How to adjust css font spacing? How to adjust css text spacing. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn