HTML5 basics-text effects

One. Text effects
1. Set font style

font-family: "Font type";
Note: directly write the corresponding English without quotes

2. Set the font size

font-size: value px;
commonly used units: px pt em

3. Set the font style

font-style: normal / italic (oblique) / oblique (oblique);

4. Set the font weight

font-weight:100-900/bold/bolder/lighter

5. Set the font color

color: color;

6. Compound attributes

font: font style or thickness font size font type;

two. Text attributes
1. Word spacing

word-spacing: value px;

2. Character spacing

letter-spacing: value px;

3. Text modification

text-decoration: none (underline) / underline (underline) / overline (overline) / line-through (strikethrough)

4. Vertical arrangement

vertical-align:
parameter description
baseline aligns the baseline of the element and the superior element
sub subscript
super superscript
top aligns the element and the most elements in the line upward
text-top aligns the font of the element and the superior element upward
bottom aligns the element and the line The lowest element is aligned downward. The
middle vertically aligns the element baseline plus the midpoint of the height of the element. The
text-bottom makes the element and the upper element's font aligned downward. The
percentage is a percentage relative to the element's line height. It will be at the upper baseline Increase the specified number of element baselines. Negative values ​​are allowed here, and negative values ​​mean that the corresponding amount is reduced

5. Text arrangement

text-align:left/right/center;

6. Text indentation

text-indent: value px / em / pt / percent;

7. Line height

line-height: value px / em / pt;

8. Blank handling

Parameter description
normal is the default attribute, which is to merge multiple consecutive spaces
pre to display the pre-formatted text
in a fixed- width font, without merging the blank distance between the text, and when the text exceeds the boundary, do not wrap. Nowrap means to force all text to be displayed on the same line , Until the end of the text or the br label
pre-wrap displays the pre-formatted text in a fixed-width font, does not merge the blank distance between the text, and wraps when the text hits the border.
Pre-line keeps the text wrap, does not retain the text The blank distance between the text, when the text meets the border line break occurs

9. Text inversion

unicode-bidi: bidi-override;
direction: ltr / rtl;

Published 32 original articles · Likes 96 · Visits 1583

Guess you like

Origin blog.csdn.net/qq_44534541/article/details/105519416