<html><head lang="en">
    <meta charset="UTF-8">
    <title></title>


    <!--
      css遵循一个规律:
      1.就近原则
      2.叠加原则
    -->
    <style>
        div{
           color: purple;
           font-size: 40px;
           background-color: yellowgreen;
        }

        p{
            color: deeppink;
            font-size: 50px;
        }
    </style>

    <link href="css/index.css" rel="stylesheet">
</head>
<body>
   <div style="color: hotpink; background-color: red;">1111111111111111111</div>
   <div>22222</div>
   <div>2233333</div>
   <div>4444</div>
   <div>5555</div>
   <p>222222222222222222222222</p>
   <p>222222222222222222222222</p>
   <p>222222222222222222222222</p>
   <p>222222222222222222222222</p>

</body></html>

index.css

div{
    color: brown;
    font-size: 50px;
}

p{
    background-color: yellow;
    color: darkgreen;
    font-size: 39px;
}

 

相关文章:

  • 2021-08-16
  • 2021-08-02
  • 2021-09-21
  • 2022-01-30
  • 2022-02-12
  • 2021-11-15
  • 2021-08-26
猜你喜欢
  • 2021-12-28
  • 2021-07-05
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
相关资源
相似解决方案