"li hover uinderline"
Bootstrap 4.1.1 Snippet by admanekishor

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <nav class="navbar navbar-expand-sm bg-light"> <!-- Links --> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" href="#">Link 1</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link 2</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Link 3</a> </li> </ul> </nav> </div> </div>
.navbar-nav >li >a:before { content: ""; position: absolute; bottom: 15px; width: 0; height: 2px; } .navbar-nav > .active>a:before, .navbar >li:hover>a:before { width: 25%; } .navbar-nav >li >a:before { background: #875298; }

Related: See More


Questions / Comments: