css有哪些字体文本样式

美女程序员鼓励师

1、font-family字体类型。可以同时声明多种字体,用逗号分隔开。

中文,楷体,需要双引号引起来。

h2{

`font-family` : '华文彩云'

}

p{

`font-family` : 隶书 , 黑体 , 宋体;

}

 

<h2> 设置字体为华文彩云</h2>

<p>

字体按隶书、黑体、宋体、顺序设置

</p>

2、font-weight 指定了字体的粗细程度。

font-weight: normal;      /* 正常 */

font-weight: bold;        /* 粗体 */

font-weight: bolder;      /* 加粗体 */

font-weight: lighter;     /* 细体 */

font-weight: 400;         /* 数字100-900,数值越大越粗,400是正常 */

3、text-indent定义块元素首行文本内容之前的缩进量。

css;toolbar:false">     /*例如*/

     text-indent: 40px;

以上就是css字体文本样式的介绍,希望对大家有所帮助。更多css学习指路:css教程

本文教程操作环境:windows7系统、css3版,DELL G3电脑。

以上是 css有哪些字体文本样式 的全部内容, 来源链接: utcz.com/z/546179.html

回到顶部