Is it possible to change the transparency of a span
within an a
element when the parent div
is hovered over?
Example HTML code:
<div id="about">
<a style="text-decoration: none;" href="/about"><h1>ABOUT ME</h1><br><span class="hover-text">test</span></a>
</div>
CSS code example:
.hover-text {
opacity: 0;
}
#about:hover .hover-text {
opacity: 1;
}
Can this effect be achieved using only CSS without any Javascript?