Bootstrap面板作为下拉列表?

时间:2014-03-26 12:29:08

标签: javascript jquery css twitter-bootstrap

我想将该面板显示为下拉列表,我尝试了它但有些样式重叠。

<div class"dropdown-menu panel panel-default">
  <div class="panel-heading">
    <h4 class="panel-title">Notifications</h4>

  </div>
  <div class="panel-body">
    some list
  </div>
</div>

如何让面板进入下拉列表?

1 个答案:

答案 0 :(得分:1)

尝试以下方法:

<div class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">
    Dropdown <b class="caret"></b>
  </a>
  <ul class="dropdown-menu" role="menu">
      <li>
        <div class"panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">Notifications</h4>
            </div>
            <div class="panel-body">
                some list
            </div>
        </div>
     </li>
 </ul>

示例:http://codepen.io/imajedi4ever/pen/kIiLf/?editors=100