选择器

引入方式

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        /*写我们的css代码*/
        /*选择器 标签选择器  共性*/
        span{
            color: yellow;
        }

    </style>
    <!-- <style type="text/css">
        @import url('./index.css');
    </style> -->


    <!-- 链接式 -->
    <link rel="stylesheet" href="./index.css">
</head>
<body>

    <!-- 
        1.行内样式

        2.内接样式
        3.外接样式
            3.1链接式
            3.2导入式
     -->
    <div>
        <p style="color: green">我是一个段落</p>
    </div>

    <div>
        <div>
            <span>我是另一个段落</span>
            <span>我是另一个段落</span>
            <span>我是另一个段落</span>
            <a href="#">路飞</a>
        </div>
    </div>
    
</body>
</html>
View Code

相关文章: