<div class='parent'>
<span class='child1'>1</span>
<span class='child2'>2</span>
</div>
.child1 {
display: block;
}
.child2 {
display: none;
}
.parent:hover .child1 {
display: none;
}
.parent:hover .child2 {
display: block;
}
<div class="bg">
<div class="grad"></div>
</div>
.bg {
position: relative;
height: 100px;
background: #f00;
}
.grad {
position: absolute;
top: 0; right: 0;
bottom: 0; left: 0;
background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}