前端 字体样式
字体样式
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文本属性</title>
<style>
.box {
width: 300px;
height: 300px;
background-color: orangered;
}
.box {
/*大小*/
font-size: 30px;
/*颜色*/
color: blue;
/*字族*/
font-family: "STSong", "新宋体", "Arial";
/*字重: lighter | normal | bold | 100 ~ 900*/
font-weight: 500;
/*字体样式*/
font-style: oblique;
}
.box {
/*文本划线: underline line-through overline*/
text-decoration: none;
/*文本水平位置: left center right*/
text-align: center;
/*行高*/
line-height: 300px;
}
.box {
/*整体设置*/
font: bold 20px/300px '黑体', 'Arial';
color: darkcyan;
text-align: left;
/*首行缩进*/
text-indent: 20px;
/*字间距*/
letter-spacing: 10px;
}
</style>
</head>
<body>
<div class="box">
文本ABC ab
</div>
</body>
</html>
![微信](https://www.cnblogs.com/images/cnblogs_com/bladecheng/1492360/o_weinxin.png)
![QQ](https://www.cnblogs.com/images/cnblogs_com/bladecheng/1492360/o_qrcode_1561712740560.jpg)
个性签名:独学而无友,则孤陋而寡闻!
如果觉得这篇文章对你有小小的帮助的话,记得点个“关注”哦,博主在此感谢!还可以扫码添加好友,交流编程上的问题哦!
万水千山总是情,点赞再走行不行!哈哈哈(っ•̀ω•́)っ✎⁾⁾!