1. Text attributes
1Style of.font-style: italic; slopingfont-style: normal;
2. Thickness format:font-weight: bold; Bolder is a thin line that is lighter than bold. The default value is a thin line.100-900A hundred digits in between3Font size:30px; Unit: px (Pixel FZ30)font-size: 30px;
4. Font format:font-family:"Regular script"; Note:1. If the value is in Chinese, use double or single quotation marks (")2. The font must be the font ff already installed on the user's computerfont-family:;
/* 1. What if the font does not exist and we do not want to use the default font? Font-family :" font 1", "alternative 1",... ; 2. What if I want to set the fonts for Chinese and English separately? ** Note: If you want to set a separate font for English in the interface, the English font must be written before Chinese 3. The most common fonts in enterprise development are: 宋体/ black font/Microsoft yahei English: "Times New Roman"/Arial */
5.abbreviation format: font: style weight size family;font:italic bold 10px "Regular script"; Note:1Sytle can be omitted, weight can be omitted, size cannot be omitted, and family cannot be omitted. Size must come before family, and size and family must come at the end of all attributesCopy the code
2. Text attributes
1. Text decoration attributes format :text-decoration: underline; Value: text-decoration: none; To get rid oftext-decoration: underline; The underlinetext-decoration: line-through; Delete the linetext-decoration: overline; On the line2. Text-align attribute format: text-align: right; Value: Left Left right Right Center3. Text indent attribute format: text-indent:2em; Ti2e values:2em, where em is the unit, and an em represents the width of an indent4Color Properties - How do I change the color of text in CSS using the color property? Format: color: value;5. Color value: RGB rGBA16Into the system5.1RGB is actually the three primary colors, wherer(red red)g(green, green)b(Blue) Format:rgb(0.0.0) The first number is used to set the brightness of the red display of the light source element of the primary colors. Each of these numbers has a value of0-255Before,0Stands for no light,255Stands for glow, and the higher the value, the brighter the red:rgb(255.0.0); Green:rgb(0.255.0); Blue:rgb(0.0.255); Black:rgb(0.0.0); White:rgb(255.255.255); As long as the red/green/blue values are the same, it is gray, and the smaller the three values are, the more black they are, and the larger they are, the more white they are.rgb(200.200.200);
5.2In the rgba rgbaaI'm going to stand for transparency0-1, the smaller the value, the more transparent it is.rgba(255.0.0.0.2);
5.3Hexadecimal in front end development through the hexadecimal to represent the color, actually is RGB hexadecimal by each two bits of the color for example:#FFEE00FF stands for R, EE stands for G00In the CSS, B can be abbreviated to one digit as long as every two digits of the hexadecimal color are the same, for example:#FFEE00= =#FE0/* What is hexadecimal? Hexadecimal, like decimal, is a way of counting values in decimal ranges0-9, one decimal value range in hexadecimal0-f: every hexadecimal9
a 10
b 11
c 12
d 13
e 14
f 15
10 16
11 17
12 18Hexadecimal and decimal conversion formulas use the first digit * in hexadecimal16+ second hexadecimal = decimal15= =1*16 + 5 = 21
12= =1*16 + 2 = 18
FF == F*16 + F == 15*16 + 15= =240 + 15 = 255
00= =0*16 + 0 = 0* /Copy the code
3. Summary
Character attribute writing:font: style weight size family;
font:italic bold 10px "Regular script";
Font-size: 28px; * /Text attribute writing:/* Text modifier */
text-decoration: none; To get rid oftext-decoration: line-through; Delete the line/* Text level centered */
text-align: center;
/* Text color */
color:#f2f2f2;
Copy the code