您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

在css文件中字体加粗属性为什么

2025/8/16 13:54:18发布17次查看
在css文件中,字体加粗属性为“font-weight”,该属性可设置字体文本的粗细程度,当属性值设置为“bold”时可定义粗体字符,设置为“bolder”时可定义更粗的字符。
本教程操作环境:windows7系统、css3&&html5版、dell g3电脑。
在css文件中,字体加粗属性为“font-weight”。
font-weight 属性可设置文本的粗细,支持多种属性值:
值描述
normal 默认值。定义标准的字符。
bold 定义粗体字符。
bolder 定义更粗的字符。
lighter 定义更细的字符。
100200300400500600700800900 定义由细到粗的字符。400 等同于 normal,而 700 等同于 bold。
示例:
<!doctype html><html> <head> <meta charset="utf-8"> <title>css 文字加粗</title> <style> p.normal { font-weight: normal; } p.bold { font-weight: bold; } p.bolder { font-weight: bolder; } p.thicker { font-weight: 900; } </style> </head> <body> <p class="normal">测试文本!</p> <p class="bold">测试文本!</p> <p class="bolder">测试文本!</p> <p class="thicker">测试文本!</p> </body></html>
(学习视频分享:css视频教程)
以上就是在css文件中字体加粗属性为什么的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product