font-family 只能引用系统自带的字体样式,如果需要其他别的字体,需要从外部下载调用 引用外部字体 网站:https://font.chinaz.com/katongziti.html 3、字体粗细 font-weight 定义字体粗细 1)normal:正常的字体。相当于number为400 2)bold:粗体。相当于number为700 3)bolder:特粗体。也相当于strong和b标签的作⽤ 4...
- font-weight:字体粗细 - normal:正常,默认 - bold:加粗 - 数值:100-500,正常;600-900加粗 - font-style:字体样式 - normal:正常 - italic:斜体,支持斜体的字体会倾斜 - oblique:斜体,不支持斜体的字体也可以倾斜 5.2 衬线体、非衬线体 - 衬线体有笔锋,非衬线体平滑(现在主流) 5.3 font的简写 - font...
粗细设置 :使用 font-weight 设置 字体粗细 ; normal :默认不加粗样式 ; bold :粗体 ; 1000 ~ 900 之间的数值 :推荐 使用 数字 进行粗体设置 ; 400 是默认的 normal 样式 , 700 是 bold 粗体样式 ; 代码语言:javascript 代码运行次数:0 运行 AI代码解释 font-weight:700; 斜体设置 :使用 font-style 设...
bold 定义粗体(加粗) 100-900 400等同于normal,而700等同于bold,注意这个数字后面不跟单位。📜 文字样式(倾斜/正常) 语法规范: 正常字体: P { font-style: normal; } 倾斜字体: P { font-style: italic; }italic倾斜字体在实际开发中很少使用,通常将倾斜的字体通过normal变为正常。
文字粗细、风格和修饰样式的标签分别是font-weight(粗细)、font-style(字体风格)和text-decoration(文字装饰)。font-weight(尺寸)font-weight样式用于设置文字的粗细,文字通过粗细之分,可以起到对部分文字强调的作用。font-weight样式值的设置有三种方式:一种是关键字设置法,关键字有normal和bold,normal是正常...
--font-weight:normal;-->font-weight:400;font-style:italic;}.tittle{font-size:20px;font-family:"黑体",Arial,"微软雅黑","Microsoft Yahei";<!--font-weight:bold;-->font-weight:700;font-style:italic;}</style></head><body><pclass="tittle">静夜思</p><p>床前明月光</p><p>疑是...
属性名:font-weight,属于font属性的一个单一属性 属性值有两种方式:单词类型、数字类型 单词类型: 数字类型: 100-900之间的整百数字 数字越大,文字显示越粗 其中400等价与normal,700等价于bold 字体风格font-style 作用:设置文字是否斜体显示 属性名:font-style,属于font属性的一个单一属性 ...
font-style:italic 1. 值 描述 normal 默认值。浏览器显示一个标准的字体样式。 italic 加载对应字体的斜体字体文件,若找不到斜体字体文件,则进行物理上的倾斜。 标签默认font-style:italic oblique 浏览器会显示一个倾斜的字体样式。 文本粗细 font-weight font-weight: bold; 1. 属性值 关键字:normal bold 具...
2字体类型{font-family:"字体1","字体2","字体3",...} 3字体大小{font-size:数值|inherit| medium| large| larger| x-large| xx-large| small| smaller| x-small| xx-small} 4字体风格{font-style:inherit|italic|normal|oblique} 5字体粗细{font-weight:100-900|bold|bolder|lighter|normal;} ...
font-weight 属性指定字体的粗细:<!DOCTYPE html> <html> <head> <style> p.normal { font-weight: normal; } p.light { font-weight: lighter; } p.thick { font-weight: bold; } p.thicker { font-weight: 900; } </style> </head> <body> <p class="normal">这是一个段落。</p> <p ...