最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

css font-weight属性怎么用

来源:动视网 责编:小采 时间:2020-11-02 22:14:57
文档

css font-weight属性怎么用

css font-weight属性怎么用:css font-weight属性用于设置显示元素的文本中所用的字体加粗。数字值 400 相当于 关键字 normal,700 等价于 bold。所有主流浏览器都支持 font-weight 属性。css font-weight属性怎么用?font-weight属性设置文本的粗细。语法:font-wei
推荐度:
导读css font-weight属性怎么用:css font-weight属性用于设置显示元素的文本中所用的字体加粗。数字值 400 相当于 关键字 normal,700 等价于 bold。所有主流浏览器都支持 font-weight 属性。css font-weight属性怎么用?font-weight属性设置文本的粗细。语法:font-wei
css font-weight属性用于设置显示元素的文本中所用的字体加粗。数字值 400 相当于 关键字 normal,700 等价于 bold。所有主流浏览器都支持 font-weight 属性。

css font-weight属性怎么用?

font-weight属性设置文本的粗细。

语法:

font-weight:normal|bold|bolder|lighter|数值|inherit;

属性值:

● normal:默认值。定义标准的字符。

● bold:定义粗体字符。

● bolder:定义更粗的字符。

● lighter:定义更细的字符。

● 数值:定义由粗到细的字符,可以设置的数值有:100、200、300、400、500、600、700、800、900。其中400 等同于 normal,而 700 等同于 bold。

● inherit:规定应该从父元素继承字体的粗细。

说明:该属性用于设置显示元素的文本中所用的字体加粗。数字值 400 相当于 关键字 normal,700 等价于 bold。每个数字值对应的字体加粗必须至少与下一个最小数字一样细,而且至少与下一个最大数字一样粗。

注释:所有主流浏览器都支持 font-weight 属性。

css font-weight属性 示例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<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>

效果图:

1.jpg

文档

css font-weight属性怎么用

css font-weight属性怎么用:css font-weight属性用于设置显示元素的文本中所用的字体加粗。数字值 400 相当于 关键字 normal,700 等价于 bold。所有主流浏览器都支持 font-weight 属性。css font-weight属性怎么用?font-weight属性设置文本的粗细。语法:font-wei
推荐度:
标签: 使用 css font-weight
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top