<!--
继承说明:
(1)进行样式选择时,不指定标签的话,该选择器是继承来的。
(2)继承的选择器的优先级为0,和标签选择器的优先级无可比性。
-->

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>权重深入</title>
    <style>
        body{
            color: #333;
            font-size: 12px;
        }

        .box #wrap2 #wrap3{
            color: green;
        }

        .box .box2 #wrap3 {
            color: red;
            /*font-size: 24px;*/
        }

    </style>
</head>
<body>
    <div class="box" id="wrap">
        <div class="box2" id="wrap2">
            <div class="box3" id="wrap3">
                <p>马玉刚</p>
            </div>
        </div>
    </div>
</body>
</html>

 

相关文章:

  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-11-22
  • 2021-11-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-11-02
  • 2022-02-26
  • 2022-02-22
相关资源
相似解决方案