css中,可以通过font-weight属性来设置字体的粗细,下面我给大家介绍下css如何设置字体的粗细

文章插图
需要这些哦
css+html
代码编纂器:Hbuilder
方式/
1打开编纂器,新建test.html页面,用于进修今天的内容

文章插图
2在页面的body区域,新建一个div,给div加上class,叫做study,用来测试今天的内容

文章插图
3在页面head标签下方写上<style></style>,用来存放css样式

文章插图
4在css样式里给study加上font-weight: bold;

文章插图
5在浏览器中打开test.html,查看实现的结果

文章插图
6在css样式里给study加上font-weight: 600;

文章插图
7【css如何设置字体的粗细】再次在浏览器中打开test.html,查看实现的结果 。 发现两次成果一样

文章插图
注重事项font-weight后面跟上数字可所以:100,200,300,400,500,600,700,800,900
font-weight后面数字400 等同于 normal,700 等同于 bold 。
以上内容就是css如何设置字体的粗细的内容啦,希望对你有所帮助哦!
推荐阅读
- wpsppt中如何制作扁平化大气欧美风过渡页面
- wps演示中如何进行半圆形图文排版
- 支付宝自动充话费设置方法
- 如何在今日头条的进入页面投放广告
- 手机百度输入法怎么设置开启离线语音
- 孟买猫应该如何饲养
- 缅因猫应该如何训练
- 苹果手机如何开启后台自动刷新
- 如何设置小米手机三指截屏操作
- 美颜相机怎么设置男生去除妆容