CSS3 Dry Goods 23: Common font style settings

1. Font color

color: 颜色;

color:#f30;
color:rgb(255,100,0);
color:rgba(255,100,0,0.4);

Two, font settings

font-family:Arial,Verdana,"Microsoft yahei",Simsun;

Three, font thickness

font-weight: normal ;  /* 字体粗细:正常 */
font-weight: bold ;    /* 字体粗细:粗体字 */
font-weight: bolder ;  /* 字体粗细:比正常粗点*/
font-weight:lighter;   /* 字体粗细:细体字 */

/* 
用数字表示文本字体粗细。取值范围:
100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 
值越大,越粗。
normal,相当于 400
bold,相当于 700
*/
font-weight:400;

Four, English letter conversion

text-transform:none;       /* 默认,不转换 */
text-transform:capitalize;  /* 首字母大写。如:Hello */
text-transform:uppercase;   /* 全大写。如:HELLO */
text-transform:lowercase;   /* 全小写。如:hello */

Five, italics

font-style: normal ;     /* 默认,正常字体 */
font-style: italic;     /* 让文字斜体 */

6. Indent the first line of text

text-indent: 2em ;  /* 缩进2个汉字大小 */

Seven, text/letter spacing

letter-spacing:10px;

Guess you like

Origin blog.csdn.net/weixin_42703239/article/details/109349325