Bootstrap -- Component-based drop-down menu, bootstrap drop-down menu

Source: Internet
Author: User

Bootstrap -- Component-based drop-down menu, bootstrap drop-down menu

Place any button.btn-groupAnd then add the appropriate menu label to make the button as the menu trigger.

The simple implementation is as follows:

Code <div class = "btn-group"> <button type = "button" class = "btn-default dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false"> Action <span class = "caret"> </span> </button> <ul class = "dropdown-menu"> <li> <a href = "#"> Action </a> </li> <a href = "#"> Another action </a> </li> <li> <a href = "#"> Something else here </a> </li> <li role = "separator" class = "divider"> </li> <li> <a href = "#"> Separated link </a> </li> </ul> </div>

 

Effect

Code <div class = "btn-group"> <button type = "button" class = "btn-danger"> Action </button> <button type = "button" class = "btn-danger dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false"> <span class = "caret"> </span> <span class = "sr-only"> Toggle Dropdown </span> </button> <ul class = "dropdown-menu"> <li> <a href = "#"> Action </a> </li> <a href = "#"> Another action </a> </li>


Effect

Obviously, a vertical line is added to the left of the triangle.

Dimensions

The size style is the same as the button style, such as btn-lg and btn-small. See the previous button introduction.

 

Pop-up menu

The implementation is simple. You only need to add the parent Element.dropupClass to open the trigger drop-down menu above.

 

This is the drop-down button group. For more information, visit www.bootcss.com.

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.