下拉菜单位于窗口区域外 - Bootstrap

时间:2013-02-11 10:10:15

标签: javascript drop-down-menu twitter-bootstrap

Bootstrap Twitter的下拉菜单在底部打开,因为在窗口区域之外没有出现。我需要在顶部展示。有财产强制出现在上面吗?

1 个答案:

答案 0 :(得分:5)

要使菜单按照您将.dropup类添加到带有.btn-group类的div的方式上去。

<div class="btn-group dropup">
  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
    Action
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
      <li>aaaaa</li>
  </ul>
</div>

此处的完整信息:

http://twitter.github.com/bootstrap/components.html#buttonDropdowns