Ravdan Ravdan - 1 year ago 94
CSS Question

How to make toggle button transparent

enter image description here

How to make toggle button transparent on hovering?

header .navbar-toggle {
border: none;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #ffffff;
}
header .navbar-header button {
color: #ffffff;
background-color: transparent;
}


I use bootstrap. Thanks in advance.

Answer Source

Use this

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">


<style>
  .navbar-header .navbar-toggle,
  .navbar-header .navbar-toggle:focus,
  .navbar-header .navbar-toggle:hover {
    background-color: transparent;
    border-color: transparent;
  }
</style>


<div class=container>
  <nav class="navbar navbar-default">
    <div class="container-fluid">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#">Brand</a>
      </div>

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      </div>
      <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
  </nav>
</div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download