2024-10-17

字体属性
颜色


大小


粗细


样式


设置元素字体


示例

点击查看代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        p{
            color: #ff0000;
            font-size:30px;/*大小*/
            font-weight:700;/*粗细*/
            font-style:italic;/*样式(倾斜)*/
            font-family:'Courier New', Courier, monospace;/*选择字体,类似word文档*/
        }
        h3{
            color:rgba(0,0,0,0.5);/*第四个值为透明度*/
        }
    </style>
</head>
<body>
    <p>学习字体属性</p>
    <h3>未来</h3>
</body>
</html>
Document

学习字体属性

未来

posted @ 2024-10-17 22:04  liu某人  阅读(0)  评论(0编辑  收藏  举报