Home  >  Article  >  Web Front-end  >  How to set text spacing in CSS

How to set text spacing in CSS

php中世界最好的语言
php中世界最好的语言Original
2018-05-23 14:07:314996browse

The tutorial I bring to you today is how to use CSS to set the spacing between words. Let’s take a look at a practical case below.

The method of using CSS to solve the distance between words is as follows:

We use css styleAttributeletter-spacing:+ Distance number + html unit

For example, letter-spacing:15px; that is, the distance between words is set to 15px (pixels).

Example:

CSS code:

.p{letter-spacing:15px;}

HTML code:

实现字与字间距方法

Distance between text

We can see from the picture above Set 15px word and word spacing effect

We use CSS letter-spacing to solve the distance between words, and the spacing between words-font spacing setting solves the style.

There are so many things to pay attention to. For more exciting content, please pay attention to php Chinese website Other related articles!

Related reading:

Answers to questions about camel case naming and JS

Boolean values, relational operators in JS, Detailed explanation and examples of logical operators

## Summary of the front-end js framework and explanation of its uses

The above is the detailed content of How to set text spacing in CSS. 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