My bootstrap navigation bar has icons that transition to text when hovered over, but the change is too abrupt. I would like it to appear more smoothly and gradually, similar to the effect on this website
This is an example of my HTML code:
<nav class='navbar navbar-expand-lg navbar-dark'>
<div class='container'>
<a class='brandFont navbar-brand' href='/'>An's Resume</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNavAltMarkup">
<div class="navbar-nav">
<div>
<a class=" about nav-item nav-link" href="#"><span class='icon'><svg class='show'xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10z"/>
</svg></span> <span class='text'></span></a>
</div>
<a class="projects nav-item nav-link" href=&quo...
<p>Here is a snippet of my CSS:</p>
<pre><code> .about:hover .icon{
display: none
}
.about .text::after{
content: 'about';
display: none;
}
.about:hover .text::after{
display: block;
}
I attempted using transforms and transitions to achieve the desired effect, but was unsuccessful. Any guidance or assistance would be greatly appreciated!