引导导航栏崩溃,但退出屏幕尺寸

时间:2018-09-30 07:17:44

标签: html twitter-bootstrap

您好,非常感谢您的帮助。我有一个引导导航栏,该导航栏在小屏幕中折叠,但是在折叠时会折叠。该图标没有显示,并且我还必须将屏幕向左滚动,因为链接仍然占据屏幕的较大尺寸,我认为代码在这里

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  
<nav class="navbar navbar-light bg-light justify-content-between main_nav" id="navbar" role="navigation">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
        <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="{% url 'home:index' %}" style="font-weight:600; font-size:18px;">DENSA</a>
    </div>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="navbar-collapse">
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fas fa-user"></i> my account <b class="caret"></b></a>
          <ul class="dropdown-menu"style="padding:5px; width: 200px">
            <a href=""><i class="fab fa-facebook" aria-hidden="true"></i></a>
            <a href="" ><i class="fab fa-twitter" aria-hidden="true"></i></a>
            <a href="" ><i class="fab fa-google-plus" aria-hidden="true"></i></a>
            <a href="" ><i class="fab fa-linkedin" aria-hidden="true"></i></a>
             <li class="divider"></li>
             <a href="" class="btn btn-success" style="width: 40%;
              margin-top:10px; border-radius:0px;">login</a>
             or
            <a href="#" class="btn btn-info" style="width: 40%;
              margin-top:10px; border-radius:0px;">sign up</a>
            <li><input type="checkbox"> <small>I agree to <a href="" > terms of services </a>and
                <a href="">privacy policy </a> of Densa</small></li>
            <li class="divider"></li>
                <li><a href="#" style="color:orange;">My order</a></li>
                <li><a href="#" style="color:orange;">My Account</a></li>
          </ul>
        </li>
        <li class="nav-item"><a href="" class="nav-link"><i class="fas fa-shopping-cart"></i></a></li>
        <li class="nav-item"><a href="{% url 'home:post_items' %}" class="nav-link" >SELL GOOD</a></li>
      </ul>
       <form class="navbar-form navbar-right" style="width:60%;">
          <div class="form-group" style="width:70%">
              <input class="form-control" type="search" placeholder="Search"
                   aria-label="Search" style="width:100%; border-radius:0px;;">
          </div>
            <button class="btn btn-outline-success"
                    type="submit" style="background:orange; color:white;"><i class="fas fa-search" style="color:white;"></i> Search</button>
        </form>
    </div><!-- /.navbar-collapse -->
</nav>

0 个答案:

没有答案