I have a design file in PSD format that looks like this.
https://i.sstatic.net/R46Ko.jpg
My goal is to create a website similar to , where when a user hovers over a link, a circle will appear around it. I am using Bootstrap 4.5 for this project.
Here is the CSS code:
ul.navbar-nav > li > a {
padding: 60px 0 16px;
text-align: center;
position: relative;
min-width: 110px;
}
ul.navbar-nav > li > a > i {
position: absolute;
top: 10px;
padding-top: 10px;
left: 0;
font-size: 25px;
right: 0;
}
ul.navbar-nav > li {
position: relative;
left: 0;
right: 0;
margin: auto;
}
ul.navbar-nav > li:before {
content: '';
position: absolute;
height: inherit;
width: inherit;
border-radius: 50%;
border: 1px solid white;
transition: all 0.3s linear;
}
ul.navbar-nav > li:hover:before {
transform: scale(30);
}
Here is a simple example of HTML code:
<li class="nav-item active">
<a class="nav-link" href="#">
<i class="fas fa-th-large fa-2x"></i>
<span>Home</span>
</a>
</li>
I found inspiration from this demo: