Currently, I am attempting to recreate this navigation bar for my YouTube-inspired project. Although I have successfully made the background of the buttons fade using linear-gradient, I am unsure how to apply the same effect to the text itself. html:
#bar-wrap{
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
gap: 0.6rem;
font-size: 0.9rem;
align-items: center;
overflow-x: scroll;
white-space: nowrap;
}
#bar-wrap .button{
background-color: rgb(211,211,211);
color: black;
width: fit-content;
height: 2rem;
border-radius: 0.8rem;
padding: 0.4rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
<div id="bar-wrap">
<div class="button" onclick="barActive(this)">All</div>
<div class="button" onclick="barActive(this)">Source: Ixo Music</div>
<div class="button" onclick="barActive(this)">Similar</div>
<div class="button" onclick="barActive(this)">Live</div>
<div class="button" onclick="barActive(this)">Recently Uploaded</div>
<div class="button" onclick="barActive(this)">Watched</div>
</div>
I also attempted to use linear-gradient on the text but encountered some difficulties.