Bootstrap button menu

Source: Internet
Author: User

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


 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.