0
点赞
收藏
分享

微信扫一扫

文字颜色(color)

兵部尚输 2022-04-24 阅读 68
css
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文本颜色</title>
    <style>
        /* 表示颜色的三种方式:
            单词、十六进制(用的最多)、RGB */
        div{
            color: blue;
        }
        p{
            color: #ff03f7;
        }
        h2{
            color: rgb(8, 233, 203);
        }
    </style>
</head>
<body>
    <div>好想吃汉堡啊!!!!</div>
    <p>好想喝可乐啊!!!!</p>
    <h2>什么时候解封啊!!!!</h2>
</body>
</html>

在这里插入图片描述

举报

相关推荐

0 条评论