0

落下

不幸的是,下拉菜单的内容被删减了。

实现菜单打开到左侧而不是右侧(没有手动 CSS hack)的 Twitter Bootstrap 方式是什么?

<div class="btn-toolbar pull-right">
    <div class="btn-group">
        <button class="btn btn-info dropdown-toggle" data-toggle="dropdown">
            Developer <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
            <li>
                <a href="#">Generate dummy data</a>
            </li>
        </ul>
    </div>
    <button class="btn">Edit</button>
</div>
4

1 回答 1

2

您可以pull-right像这样将类添加到下拉菜单中:

Jsfiddle演示

<div class="btn-toolbar pull-right">
<div class="btn-group open">
    <button data-toggle="dropdown" class="btn btn-info dropdown-toggle">
        Developer <span class="caret"></span>
    </button>
    <ul class="dropdown-menu pull-right"><!-- this is where pull-right is applied-->
        <li>
            <a href="#">Generate dummy data</a>
        </li>
     </ul>
  </div>
<button class="btn">Edit</button>

于 2013-03-09T16:44:53.547 回答