CSS can not only statically modify the Web page, but also with a variety of scripting language dynamically to the elements of the page format. CSS enables precise pixel-level control of the placement of elements in a Web page, supports almost all font-size styles, and has the ability to edit Web page objects and model styles. In this article, we share a detailed description of CSS paragraph properties.
CSS also allows you to control the attributes of a paragraph, including word spacing, character spacing, text decoration, portrait arrangement, text conversion, text flow, text indentation, and line height.
1.1 Word Interval word-spacing
Grammar:
Word-spacing: Take value
Description
The value can be used with mormal, or the length value can be used. Normal is the regular interval, which is the default option, and the length is the number and unit of the word interval, or negative values can be used.
1.2 Character interval letter-spacing
Use the interval to control the distance between characters.
Grammar:
Letter-spacing: Take value
1.3 Text Decoration Text-decoration
You can use text-decoration properties to decorate text, such as underline, strikethrough, and so on.
Grammar:
Text-decoration: Take value
Description
None means no adornment, is the default value, underline indicates that the text is underlined, overline indicates that the text is underlined, Line-through is a strikethrough, and blink indicates a text flicker effect.
1.4 Vertical Alignment Bertical-align
Use vertical alignment to set the vertical alignment of text.
Grammar:
Vertical-align: Arranging values
Description
The vertical-align includes the following values:
Baseline: The default vertical alignment of the browser;
Sub: subscript of the text;
Super: Superscript of text
Top: Vertical alignment;
Text-top: Aligns the font of the element and the ancestor element upward;
Middle: Vertical center alignment;
Text-bottom: Aligns the font of the element and the ancestor element downward.
1.5 Text Conversion Text-transform
Text conversion properties are used to convert the case of an English letter.
Grammar:
Text-transform: Conversion value
Description
The text-transform includes the following values:
None: Indicates the use of the original value;
Capitalize: Indicates the use of the first letter of each word capitalized;
Uppercase: Indicates capitalization of all letters using each word;
Lowercase: Indicates that all letters using each word are lowercase;
1.6 Horizontal Alignment Text-align
Use the Text-align property to set the horizontal alignment of text.
Grammar:
Text-align: Arranging values
Description
The horizontal alignment value includes: left,right,center,justify four kinds.
1.7 Text Indent Text-indent
In HTML, you can only control the overall right indent of a paragraph, and if you do not set it, the browser defaults to no indentation, while in CSS you control the first line indent of the paragraph and the distance of the indentation.
Grammar:
Text-align: Indent value
1.8 Text line Height Line-height
Use the text line Height property to control the distance between rows in a paragraph and lines.
Grammar:
Text-align: Row High value
Description
The row height value can be a length, a multiplier, or a percentage.
1.9 Handling Blank White-space
White-space Zodiac used to set the page content blank processing way
Grammar:
White-space: Blank value
Description
White-space includes 3 values, where normal is the default property, the pre causes spaces and line breaks in the source code to be preserved, and nowrap forces all text to be displayed on the same line.
1.10 Text anti-Unicode-bidi, direction
Unicode-bidi, direction properties are often used together to set the reading order of objects.
1.unicode-bidi Property
Grammar:
Unicode-bidi:bidi-override |normal| Embed
Description
In the value of the Unicode-bidi property, bidi-override means that the value of the direction zodiac is strictly rearranged, the normal is represented as the default, and embed indicates that the object opens an additional embedded layer, and the value of the direction property formulates the embedded layer. A hidden retry is arranged inside the object.
2.direction Properties
Grammar:
Unicode:lir |rtl| Inherit
Description
In the value of the direction property, LTR is read from left to right, RTL is read from right to left, and inherit indicates that the value of the text stream is not inheritable.
The above content is CSS paragraph attribute detailed, hope can help everyone.