xxxxxxxxxx
#a:hover + #b {
background: #ccc
}
<div id="a">Div A</div>
<div id="b">Div B</div>
xxxxxxxxxx
#a:hover ~ #b {
background: #ccc
}
<div id="a">Div A</div>
<div>random other elements</div>
<div>random other elements</div>
<div>random other elements</div>
<div id="b">Div B</div>
xxxxxxxxxx
.showme {
display: none;
}
.showhim:hover .showme {
display: block;
}
<div class="showhim">HOVER ME
<div class="showme">hai</div>
</div>
xxxxxxxxxx
.hover {
background-color: blue;
padding: 8px;
}
.move {
background-color: red;
padding: 8px;
transition: 0.5s;
}
.hover:hover ~ .move {
margin-top: 48px;
}
xxxxxxxxxx
#a:hover + #b {
background: #ccc
}
<div id="a">Div A</div>
<div id="b">Div B</div>