So I have this CSS code
.body .card .card_img:hover, <- works
.body .card .card_bg_layer:hover ~ .card_img <- does not work {
border-radius: 2px;
box-shadow: 0px 0px 18px black;
max-width: 85%;
max-height: 100%;
left: -20px;
top: -20px;
}
.body .card .card_img:hover ~ .card_bg_layer, <- works
.body .card .card_bg_layer:hover <- works {
opacity: 0.2;
}
and this is how my html looks like
as u may know, I want .card_img
to do something when .body .card .card_bg_layer
is hovered, someone told me that css can only go down and not up, while I have no doubt that that's true but is css really that limited?