给div一个class “dropdown”,将下拉菜单放在这个div里就可以显示bootstrap的下拉菜单。
<div>
<button type="button" data-toggle="dropdown">
Dropdown
<span></span>
</button>
<ul role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Regular link</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Disabled link</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another link</a></li>
</ul>
</div>