Can css adjust the spacing between words and the left and right sides of the words?

青灯夜游
Release: 2022-05-18 17:30:31
Original
5654 people have browsed it

css can adjust the spacing between words and words. In CSS, you can use the letter-spacing attribute to adjust the left and right spacing between words. The syntax is "letter-spacing: spacing value;"; this attribute allows the use of negative values, which can be increased or reduced by the positive or negative value of the attribute. Reduce the space between characters (character spacing).

Can css adjust the spacing between words and the left and right sides of the words?

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

css can adjust the spacing between words and the left and right sides of the words.

In CSS, you can use the letter-spacing attribute to adjust the left and right spacing between words.

The letter-spacing property can set the space between characters (character spacing).

Syntax format:

letter-spacing:间距值;
Copy after login
  • Spacing value: Defines the fixed space between characters.

Note:

  • The letter-spacing property defines how much space is inserted between text character boxes. Because character glyphs are typically narrower than their character boxes, specifying a length value adjusts the usual spacing between letters. Therefore, normal is equivalent to a value of 0.

  • For this attribute: each Chinese character is regarded as a "character", and each English letter is also regarded as a "character"! So pay close attention.

The letter-spacing attribute allows the use of negative values, and the character spacing can be increased or decreased by the positive or negative value of the attribute.

Example:

     

This is header 1

这是一段文本!

这是一段div文本!
Copy after login

Can css adjust the spacing between words and the left and right sides of the words?

(Learning video sharing:css video tutorial,web front-end)

The above is the detailed content of Can css adjust the spacing between words and the left and right sides of the words?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!