css rules define how to set line spacing

青灯夜游
Release: 2022-12-30 11:12:06
Original
2656 people have browsed it

In css rules, you can use the Line-height attribute to set the line spacing, the syntax format is "line-height: value". The line-height attribute can set the amount of space used by the line, that is, the distance between lines; the larger the value of the line-height attribute, the higher the line spacing.

css rules define how to set line spacing

The operating environment of this tutorial: windows7 system, css3&&html5 version, Dell G3 computer.

In CSS, you can set the line spacing with the help of the line-height property. The larger the value of the line-height attribute, the higher the line spacing.

(Learning video sharing:css video tutorial)

The line-height attribute is used to set the amount of space used by the line, that is, the distance between lines.

Note: The line-height attribute does not allow negative values.

Attribute value:

  • normal Default. Set reasonable line spacing.

  • #number Set a number, which will be multiplied by the current font size to set the line spacing.

  • #length Set a fixed line spacing.

  • % % line spacing based on the current font size.

Example:

css rules define how to set line spacing

##Effect:

css rules define how to set line spacing

For more programming-related knowledge, please visit:

Introduction to Programming! !

The above is the detailed content of css rules define how to set line spacing. 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!