I have a <div id='a'> which becomes transparent when hovering on its parent element. But the div's content is supposed to be non-transparent. The code is following:
.changer{        
    background-color: gray;
    opacity:0;
    display: block;
    transition: .5s ease;
    backface-visibility: hidden;
}
.mb-4:hover .changer{
    opacity: 0.6;
}<a href="#" class="d-block mb-4">
    <div id="a" class="changer d-inline">The text that must be non-transparent</div>
    <img class="img-fluid img-thumbnail" src="images/barcelona.jpg" alt="">  <!--this element is not very important-->
</a> 
     
     
    