Answers for "how to change the nav bar toggler icon in bootstrap 5"

CSS
1

how to style navbar-toggler-icon bootstrap 5

<!--HTML-->
 <button class="navbar-toggler custom-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon  "></span>
 </button>
 
<!--STYLE-->
<!--CHANGE THE STROKE COLOR-->
.custom-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
}
Posted by: Guest on July-17-2021

Code answers related to "how to change the nav bar toggler icon in bootstrap 5"

Browse Popular Code Answers by Language