First, CSS commonly used font properties
1. Font settings
Fonts are set by the Font-family property in the CSS.
Font-family: "Bold";
2. Size of the font
Use Font-size to set the size of the text font-size:16px; PX is a unit of length, 1px means 1 pixel size with color set text color
3. Color of the font
Color:black; Color: #FFFFFF;
Color:rgb (255,255,000);
Color:rgb (0%,100%,100%);
Colors can be expressed in English words, hexadecimal codes, and RGB.
Ii. properties of commonly used text
1. Line Spacing
To set line spacing with the Line-height property
line-height:20px;
Line-height:2;
20px indicates that the line spacing is 20 pixel size, and the number with no units only digits is a multiple of the font size. If the font size is 16px, 2 of the line spacing is 40px.
2. First Line Indent
Use Text-indent to represent the first line indent
text-indent:30px;
3. Text alignment
Use Text-align to set the alignment of text
Text-align:left;
Text-align:right;
Text-align:center;
text-align:justify;
Left is right-aligned, right is right-aligned, center is centered. The justify is to align both ends, adjusting the spacing between the words and letters so that the lines are exactly equal in length.
4. The decoration of the text
To decorate text with the Text-decoration property
Text-decoration:none;
Text-decoration:underline;
Text-decoration:overline;
Text-decoration:line-through;
Text-decoration:blink;
None is to cancel the Decoration property, underline add an underscore, overline add a line at the top of the text, Line-through a line in the middle of the text, and blink make the text blink.