Twitter Bootstrap Collapse Group Only On Phone

后端 未结 1 638
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 08:45

I have a site written using Twitter Bootstrap. I have a group of buttons on the site that I want to collapse but only when the site is viewed on a phone. So when a user is v

相关标签:
1条回答
  • 2021-01-18 08:59

    See if this helps you: http://jsfiddle.net/panchroma/7fYVD/

    It's a simplified version of responsive navbar on http://twitter.github.com/bootstrap/components.html#navbar

    HTML is below.

    Good luck!

    <div class="navbar">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".IndustriesMenu" style="color:black;">view details
          </a>
          <!-- Everything you want hidden at 940px or less, place within here -->
          <div class="nav-collapse collapse IndustriesMenu">
            <ul class="nav">
              <li><a href="#">Button 1</a></li>
              <li><a href="#">Button 2</a></li>
              <li><a href="#">Button 3</a></li>
            </ul>
          </div><!-- /.nav-collapse -->
        </div>
      </div><!-- /navbar-inner -->
    </div>
    
    0 讨论(0)
提交回复
热议问题