<h1>This is a heading.</h1>
<p>This is paragraph.</p>
<p>This is paragraph.</p>

<style type="text/css"> h1 + p {margin-top:50px; } </style>Copy the code
Adjacent sibling selectors connect parent elements with a + sign to point to subset elements with >Copy the code

<style>
    .father{
        color: yellow;    
}
    .father:hover>.son{
        color: red;
    }
    .father:hover+.fatherB{
        color: blue;
    }    
.father:hover+.fatherB>.sonB{
        color: green;
    }
</style>
<body>
    <div class="father">father
        <div class="son">son</div>
    </div>
    <div class="fatherB"> parent <div class="sonB"</div> </div>Copy the code