简体   繁体   English

导航栏容器可移动折叠全宽(容器流体)

[英]navbar container to mobile collapse full width(container-fluid)

i have a container div where i have my logo, and at the right i have my menu, what i want to do is, when the navbar gets at screen size mobile i want each 我有一个容器div,其中有我的徽标,在右边有菜单,我想要做的是,当导航栏达到屏幕大小移动时,我希望每个

  • to be on a row and each row is the size of a container-fluid, at the moment the issue is that each li size is the same of my container, how i can change this? 排成一行,每行是一个容器流体的大小,目前的问题是每个li大小与我的容器相同,我该如何更改呢?

    this is my code: 这是我的代码:

      <div id="navigation_bar"> <div class="content"> <div id="logo"> <a href="index.html"> <img class="logo_dark" src="images/virtuai/logo-dark.png" alt="Enar Logo"> <img class="logo_light" src="images/logo-light.png" alt="Enar Logo"> </a> </div> <nav id="main_nav navbar-right"> <div id="nav_menu"> <span class="mobile_menu_trigger"> <a href="#" class="nav_trigger"><span></span></a> </span> <ul id="navy" class="clearfix" style="float:right"> <li class="normal_menu mobile_menu_toggle current_page_item"> <a href="index.html"><span>HOME</span></a> </li> <li class="normal_menu mobile_menu_toggle current_page_item"> <a href="index.html"><span>ABOUT US</span></a> </li> <li class="normal_menu mobile_menu_toggle current_page_item"> <a href="index.html"><span>SOLUTIONS</span></a> </li> <li class="normal_menu mobile_menu_toggle current_page_item"> <a href="index.html"><span>CONTACT US</span></a> </li> </ul> </div> </nav> <!-- End Nav --> <div class="clear"></div> </div> 
  • Try this code.. overwrite the bootstrap container width 试试这个代码..覆盖引导容器的宽度

    @media screen and (max-width: 768px) {
      body .container{
        width:100% !important;
      }
    }
    

    声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM