Bootstrap navbar with two rows

前端 未结 3 1498
孤城傲影
孤城傲影 2020-12-28 08:56

I am wanting to have a Bootstrap 3 navbar that has two rows with navigation elements, and with navbar-brand spanning both rows. On SM+ screen sizes both rows are visible. On

3条回答
  •  死守一世寂寞
    2020-12-28 09:19

    You can essentially use two navbars and then use position: absolute for your image. You could potentially use the grid but your collapse menu won't be full-width on mobile most likely then.

    Working Example:

    .navbar-inverse.nav-upper {
      height: 50px;
    }
    .navbar-inverse.nav-upper ul {
      float: right;
      display: table;
    }
    .navbar-inverse.nav-upper .navbar-upper > li {
      display: table-cell;
      font-size: 14px;
    }
    .navbar-inverse.nav-upper .navbar-upper > li > a {
      color: #777;
    }
    @media (min-width: 768px) {
      .navbar.navbar-lower .navbar-nav {
        margin-left: 100px;
      }
    }
    .navbar-logo {
      background-image: url('https://lh3.googleusercontent.com/-tw5LsU4Fg28/Umo6BBcoCnI/AAAAAAAAmjE/1iqULsem06E/w896-h896/heisencat.png');
      width: 90px;
      height: 90px;
      background-size: cover;
      background-position: center center;
      background-repeat: no-repeat;
      position: absolute;
      top: 5px;
      left: 15px;
      z-index: 1051;
    }
    
    
    
    
    
    
    
    

提交回复
热议问题