Hi, I used the after
psedo-element for that purpose. This is my code:
.text-container__link::after {
content: "";
position: absolute;
height: 10px;
width: 100%;
border-radius: 5px;
bottom: -2px;
left: 0px;
z-index: -1;
opacity: 0.25;
transition: opacity 0.25s ease-in;
}
.text-container__link:hover::after {
opacity: 1;
}
I put the background color in a modifier.
Marked as helpful
1