Make Bootstrap 3.0 NavBar content always collapsed

前端 未结 5 1751
逝去的感伤
逝去的感伤 2020-12-06 18:48

I need to make a section of a NavBar of Bootstrap 3.0 always collapsed.

Actual sections of the navbar:

  • Links
  • Search Form
  • Login Form
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-06 19:32

    You have to override some css to make it stay collapsed

    http://jsbin.com/UpeZazi/1/edit

    In this example i made the "user login" button stay collapsed.

    css:

    @media (min-width: 768px) {
      #login-btn {
        display: block;
      }
    
      #sesion.collapse {
        display: none !important;
      }
    }
    

    html:

    basically the same except i added the id login-btn to your login user button element:

    
    

提交回复
热议问题