Bootstrap button menu
Button drop-down menu
To add a drop-down menu to a button, simply place the button and drop-down menu in A. btn-group.
<Script type = "text/javascript" src = ".. /jquery-1.11.2.min.js "> </script> <script type =" text/javascript "src = ".. /bootstrap-3.3.5-dist/js/bootstrap. min. js "> </script> Button menu
- Sub menu 1
- Sub menu 2
- Sub menu 3
- Sub menu 4
Button menu
- Sub menu 1
- Sub menu 2
- Sub menu 3
- Sub menu 4
Div class = "dropdown" is not used here. Although dropdown can also implement the button drop-down menu, dropdown is block-level display. While. btn-group
The display is inline-block.
Effect:
Split button drop-down menu
Use two buttons, one to display the content, and the other to display the drop-down Function
Button menu
- Sub menu 1
- Sub menu 2
- Sub menu 3
- Sub menu 4
Button menu
- Sub menu 1
- Sub menu 2
- Sub menu 3
- Sub menu 4
Effect:
You only need to add. dropup to the. btn-group container.
Button menu
- Sub menu 1
- Sub menu 2
- Sub menu 3
- Sub menu 4
Button menu
- Sub menu 1
- Sub menu 2
- Sub menu 3
- Sub menu 4