CSS Bootstrap - 移动导航从右侧滑入

时间:2016-06-26 18:32:21

标签: jquery html css twitter-bootstrap navbar

我正在使用bootstrap进行网站导航,但我正在查看此网站的移动版本:http://www.levelone.ca/我喜欢他们的导航如何从右侧滑入。

是否可以使用bootstrap执行此操作,或者我是否可以使用其他插件来获取该样式?

这是我的引导程序导航:



<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Who We Are <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="/about-us/">About Us</a>
            </li>
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">What We Do <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="/home-renovation/">Homes Renovation</a>
            </li>
            <li><a href="/custom-home/">Custom Home</a>
            </li>
            <li><a href="/project-management/">Project Management</a>
            </li>
            <li><a href="/condo-renovations/">Condo Renovations</a>
            </li>
            <li><a href="/luxury-features/">Luxury Features</a>
            </li>
          </ul>
        </li>
        <li>
          <a href="/our-projects/">Our Projects</a>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Our Insight <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="/blog/">Blog</a>
            </li>
            <li><a href="#">Inspiration Board</a>
            </li>
          </ul>
        </li>
        <li>
          <a href="/our-process/">Our Process</a>
        </li>
        <li>
          <a href="/contact-us/">Contact Us</a>
        </li>
      </ul>
    </div>
  </div>
</nav>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:-1)

默认情况下,bootstrap不提供移动菜单的预期行为。但您可以使用CSS覆盖bootstrap提供的样式。