.links {
position: relative;
background: red;
}
.links .balls {
position: absolute;
top: -20px;
left: -20px;
width: 10px;
height: 10px;
background-color: white;
}
.links:hover .balls {
background-color: green;
}
.links .balls:hover {
background-color: white;
}
<div class="links">
<div class="ball"></div>
</div>