CSS_字体属性

1.字体

font-family:"字体1", "字体2",……;
/*从左到右依次选择用户电脑中的字体*/

2.字体大小

font-size: 100px;
/*设置字体大小为100像素*/

3.字体颜色

/*rgb表示法:*/
color:rgb(125,45,199);
/*rgba表示法:a表示透明度,取值范围0-1*/
color:rgba(255, 155, 55, 0.5);
/*十六进制表示法*/
color:#400080;
/*单词表示法*/
color:blue;

4.字体样式

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

5.字体粗细

font-weight: 900;
/*设置字体粗细:数值(默认为400)*/
font-weight:bolder;
/*设置字体粗细:单词(更粗的默认为normal正常*/

6.文本属性

/*默认的:没有效果*/
text-decoration: none;
/*下划线*/
text-decoration:underline;
/*上划线*/
text-decoration:overline;
/*删除线*/
text-decoration:line-through;

猜你喜欢

转载自www.cnblogs.com/wangdianchao/p/12505365.html