CSS字体属性案例
作者:互联网
```<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>设置字体变体、粗细、复合属性</title>
<style type="text/css">
h3{text-align: center;color: #3300ff;}
hr{color: coral;}
#p1{font-variant: normal;font-weight: bold;}
#p2{font-variant: small-caps;font-weight: lighter;}
#p3{font-weight: 600;font:italic 28px/40px 幼圆;}
#p4{font:italic bolder small-caps 24px/1.5em 黑体;}
</style>
</head>
<body>
<h3>设置字体变体、粗细、复合属性</h3>
<hr>
<p>此段文字正常显示welcome to you!</p>
<p id="p1">你好好看</p>
<p id="p2">天外之物</p>
<p id="p3">huaishui</p>
<p id="p4">建党</p>
</body>
</html>
![在这里插入图片描述](https://www.icode9.com/i/ll/?i=20210426231714280.png?,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3plbmdkYW5saQ==,size_16,color_FFFFFF,t_70)
标签:weight,color,text,案例,字体,italic,font,CSS 来源: https://blog.csdn.net/zengdanli/article/details/116176856