Bootstrap component (1) menu, bootstrap component menu

Source: Internet
Author: User

Bootstrap component (1) menu, bootstrap component menu

Glyphicons font icon

Base class. glyphicon {position/top/display/font-family /}

Specific Class {content} -- represented on pseudo elements

Usage tips: a. base class + specific class B. Add a space between the icon and text

Note: a. Do not use one label with other components. Generally, use span, e.g.: <span class = "glyphicon-search"> </span>

B. Labels of the font icon class should not be nested with elements or contain text

Font icon source file location change: the default position relative to css, and then in the ../fonts/directory, if you want to change the location, modify less or compiled css

Drop-down and pop-up menu

A. Outsourcing Element B. Pull down the trigger c. Menu list

Outsourcing element class. dropdown/. dropup {position}

The trigger data-toggle is used for js hooks to switch the opening and closing of the open Class of the outer element.

Menu list dropdown-menu {position/top/left/z-index/float/padding/margin/border/box-shadow}

E.g.: div> (button + ul) (drop-down by default) You can add a class. dropdown or dropup or relative style to the div.

<Div class = "dropdown"> <! -- The class of this element can be set to dropdown/dropup/or separately set the style to position: relative; --> <! -- Outsourcing element --> <button class = "btn-default" data-toggle = "dropdown"> <! -- Trigger --> Dropdown <span class = "caret"> </span> </button> <ul class = "dropdown-menu"> <! -- Menu --> <li> <a href = "#"> Action </a> </li> <a href = "#"> Another action </ a> </li> <a href = "#"> Something else here </a> </li> <a href = "#"> Separated link </a> </li> </ul> </div>

Drop-down and pop-up menu-Alignment

Left alignment by default

Left alignment. dropdown-menu-left {right/left}

Right-aligned. dropdown-menu-right {right/left}

The elements caused by overflow of other elements need to be blocked.

<ul class="dropdown-menu dropdown-menu-right">...</ul> 

Drop-down menu-menu title

Title. drop-header {font-size/color}

<ul class="dropdown-menu">...<li class="dropdown-header">Dropdown header</li>...</ul>

Drop-down menu-split line

Split line. divider {height/margin/background-color} -- role = "separator"

<ul>...<li role="separator" class="divider" ></li>...</ul> 

Drop-down and pop-up menu-Disable menu

Disable. disabled {color}

<ul>...<li><a href="#">disabled link</a></li>...</ul>

The above content is the relevant knowledge of the bootstrap component introduced by the small Editor, and I hope to help you!

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.