twitter-bootstrap 将下拉菜单添加到引导程序中的链接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24601611/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 21:04:29 来源:igfitidea点击:
Adding dropdown menu to link in bootstrap
提问by ?s??? ????
How can I add a dropdown menu to custom link in Boostrap?. It is described through official Bootstrap componentspage how to add dropdown only for clickable buttons not for custom links.
如何在 Boostrap 中向自定义链接添加下拉菜单?通过官方Bootstrap 组件页面描述了 如何仅为可点击按钮而不是自定义链接添加下拉列表。
回答by ?s??? ????
Not sure if this is what you're looking for
不确定这是否是您要找的
<div class="dropdown">
<a class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
Link
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</div>

