bootstrap在navbar固定顶部显示搜索结果

时间:2016-01-29 21:14:51

标签: css twitter-bootstrap nav

所以我有一个非常简单的带navbar navbar-default navbar-fixed-top类的引导程序导航。我想将搜索结果写入搜索表单下的div中。像facebooks搜索结果的东西。任何人都可以帮助我,提前谢谢。

这是代码:

 <nav class="navbar navbar-default navbar-fixed-top" ng-controller="navController">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">

        <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="#">MyProjectName</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="toCollapse">
      <form class="navbar-form navbar-left" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search" id="search" ng-keyup="null">

        </div>
        <button type="submit" class="btn btn-default" ng-click="search()">Submit</button>
<div>Results here</div>
      </form>

    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

0 个答案:

没有答案