I want to do make "World!" appear at 100% opacity when hovered over. But it doesn't work. However, if you swap the two numbers and make the opacity of .header=1 and .world:hover=0.5 the code works. So the :hover works when trying to reduce opacity, but not when trying to increase it. Does that mean 100% opacity of child is equal to the assigned opacity of the parent? Any way to fix that?
.header {
opacity: 0.5;
}
.world:hover {
opacity: 1;
}
<div class="header">
<h1>Hello <span class="world">World!</span></h1>
</div>