2024-10-16

选择器:
全局
元素

ID
合并







示例

点击查看代码
<!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>
        * {
            font-size: 30px;
            color: red;
        }/*全局*/
        span{
            font-size:30px;
            color:green;
        }/*元素*/
        .one{
            color:blue;
        }
        .size{
            font-size:20px;
        }/*类选择器,空格分开多个类*/
        #xx{
            font-size:40px;
        }/*ID选择器*/
        h4,h5{
            color:aqua;
            font-size:20px;
        }/*合并选择器*/
    </style>
</head>
<body>
    <h3>hhh1</h3>
    <p id="xx">www2</p>
    <p>aaa3</p>
    <p class="one size">bbb4</p>
    <p>我先学java,在学<span>前端</span></p>
    <h4>我是4</h4>
    <h5>我是5</h5>
</body>

</html>
posted @ 2024-10-16 23:15  liu某人  阅读(1)  评论(0编辑  收藏  举报