1. Text Indent text-indent
1{font-size: 12px;} 2 . Show {text-indent: 24px;}
The font is 12px, the first line indents 2 men, then set to indent 24px;
2. Text Case Conversion Text-transform
Capitalize |
Each word in the text begins with an uppercase letter. |
Uppercase |
Only uppercase letters are defined. |
lowercase |
Defines no capital letters, only lowercase letters. |
3. Text Decoration text-decoration
Underline |
Defines a line below the text. |
Overline |
Defines a line on the text. |
Line-through |
Defines a line that passes through the text. |
Blink |
Defines the blinking text. No browser support |
4. Text Position text-align
Left |
Arrange the text to the left. Default value: determined by the browser. |
Right |
Arrange the text to the right. |
Center |
Arrange the text in the middle. |
5. Spacing between words word-spacing
word-spacing:14px; Can be positive, can be negative
6. Blank White-space
Normal |
By default, whitespace is ignored by the browser. |
Or: |
The blank will be reserved by the browser. It behaves like a <pre> tag in HTML. |
NoWrap |
The text does not wrap, and the text continues on the same line until the <br> tag is encountered. |
Pre-wrap |
Keep the whitespace between the text (there are several blanks left several), wrap. |
Pre-line |
Merge the blanks between the text (leaving only one blank character), wrapping. |
7. Colour Color of text
Red, #fff, RGB (0,0,255)
8. Row Height Line-height
Normal |
By default, the average browser row row height is 110% or 120% |
Number |
Sets the number that is multiplied by the current font size to set the line spacing. |
Length |
Sets the fixed line spacing. |
% |
The percentage line spacing based on the current font size. |
Set text vertically centered: height:26px;line-height:26px;
Abbreviation Line-height, such as {font: <FONT-SIZE>/<LINE-HEIGHT>;}
P {font:12px/20px;}
9. Font font-family
Serif and sans serif comparison:
10. Font size Font-size
- Xx-small
- X-small
- Small
- Medium
- Large
- X-large
- Xx-large
|
Set the font size to a different size, from Xx-small to Xx-large. Default value: Medium. |
Smaller |
Set the font-size to a smaller size than the parent element. |
Larger |
Set the font-size to a larger size than the parent element. |
Length |
Set the font-size to a fixed value. |
% |
Set Font-size to a percentage value based on the parent element . |
11. Font Weight font-weight
100~900; 400 equals normal,700 equivalent to Bold
12. Custom Font @font-face
task0001 Common Properties for text