小白教程
所有教程
关于
Search
172.70.126.177
172.70.126.177
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Pr font weight”的源代码
本页内容
上一节:
Pr_font_font_variant
下一节:
Css3_pr_font_face_rule
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:font-weight}}[[Category:css reference|126]] = CSS font-weight 属性 = 三段文字设置不同的字体粗细: <sample title="" desc="" lang="html" hererun="1"> p.normal {font-weight:normal;} p.thick {font-weight:bold;} p.thicker {font-weight:900;} </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <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">This is a paragraph.</p> <p class="light">This is a paragraph.</p> <p class="thick">This is a paragraph.</p> <p class="thicker">This is a paragraph.</p> </body> </html> </run> == 属性定义及使用说明 == font-weight 属性设置文本的粗细 {| class="table table-striped table-hover" | 默认值: | normal |- | 继承: | yes |- | 版本: | CSS1 |- | JavaScript 语法: | object.style.fontWeight="900" |} == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 属性 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | font-weight | 2.0 | 4.0 | 1.0 | 1.3 | 3.5 |} == 属性值 == {| class="table table-striped table-hover" !width="50%"| 值 !width="50%"| 描述 |- | normal | 默认值。定义标准的字符。 |- | bold | 定义粗体字符。 |- | bolder | 定义更粗的字符。 |- | lighter | 定义更细的字符。 |- | * 100 * 200 * 300 * 400 * 500 * 600 * 700 * 800 * 900 | 定义由细到粗的字符。400 等同于 normal,而 700 等同于 bold。 |- | inherit | 规定应该从父元素继承字体的粗细。 |} == 相关文章 == CSS 教程: [[css font|CSS Font]] CSS 参考手册: [[pr font font|font 属性]]
返回至“
Pr font weight
”。
上一节:
Pr_font_font_variant
下一节:
Css3_pr_font_face_rule