亚洲一区二区三区在线播放,伊人久久精品无码av一区,亚洲国产精品一区二区第一页免,无码aⅴ精品一区二区三区浪潮

Dropdowns

Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.

Overview

Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They’re made interactive with the included Bootstrap dropdown JavaScript plugin. They’re toggled by clicking, not by hovering; this is an intentional design decision.

Dropdowns are built on a third party library, Popper, which provides dynamic positioning and viewport detection. Be sure to include popper.min.js before Bootstrap’s JavaScript or use bootstrap.bundle.min.js / bootstrap.bundle.js which contains Popper. Popper isn’t used to position dropdowns in navbars though as dynamic positioning isn’t required.

Accessibility

The WAI ARIA standard defines an actual widget, but this is specific to application-like menus which trigger actions or functions. ARIA menus can only contain menu items, checkbox menu items, radio button menu items, radio button groups, and sub-menus.

Bootstrap’s dropdowns, on the other hand, are designed to be generic and applicable to a variety of situations and markup structures. For instance, it is possible to create dropdowns that contain additional inputs and form controls, such as search fields or login forms. For this reason, Bootstrap does not expect (nor automatically add) any of the role and aria- attributes required for true ARIA menus. Authors will have to include these more specific attributes themselves.

However, Bootstrap does add built-in support for most standard keyboard menu interactions, such as the ability to move through individual .dropdown-item elements using the cursor keys and close the menu with the ESC key.

Examples

Wrap the dropdown’s toggle (your button or link) and the dropdown menu within .dropdown, or another element that declares position: relative;. Dropdowns can be triggered from <a> or <button> elements to better fit your potential needs. The examples shown here use semantic <ul> elements where appropriate, but custom markup is supported.

Single button

Any single .btn can be turned into a dropdown toggle with some markup changes. Here’s how you can put them to work with either <button> elements:

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown button
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
  </ul>
</div>

And with <a> elements:

<div class="dropdown">
  <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown link
  </a>

  <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
  </ul>
</div>

The best part is you can do this with any button variant, too:

<!-- Example single danger button -->
<div class="btn-group">
  <button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Action
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
    <li><hr class="dropdown-divider"></li>
    <li><a class="dropdown-item" href="#">Separated link</a></li>
  </ul>
</div>

Split button

Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of .dropdown-toggle-split for proper spacing around the dropdown caret.

We use this extra class to reduce the horizontal padding on either side of the caret by 25% and remove the margin-left that’s added for regular button dropdowns. Those extra changes keep the caret centered in the split button and provide a more appropriately sized hit area next to the main button.

<!-- Example split danger button -->
<div class="btn-group">
  <button type="button" class="btn btn-danger">Action</button>
  <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
    <li><hr class="dropdown-divider"></li>
    <li><a class="dropdown-item" href="#">Separated link</a></li>
  </ul>
</div>

Sizing

Button dropdowns work with buttons of all sizes, including default and split dropdown buttons.

<!-- Large button groups (default and split) -->
<div class="btn-group">
  <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Large button
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>
<div class="btn-group">
  <button class="btn btn-secondary btn-lg" type="button">
    Large split button
  </button>
  <button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>
<div class="btn-group">
  <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Small button
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>
<div class="btn-group">
  <button class="btn btn-secondary btn-sm" type="button">
    Small split button
  </button>
  <button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>

Dark dropdowns

Opt into darker dropdowns to match a dark navbar or custom style by adding .dropdown-menu-dark onto an existing .dropdown-menu. No changes are required to the dropdown items.

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown button
  </button>
  <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="dropdownMenuButton2">
    <li><a class="dropdown-item active" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
    <li><hr class="dropdown-divider"></li>
    <li><a class="dropdown-item" href="#">Separated link</a></li>
  </ul>
</div>

And putting it to use in a navbar:

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Navbar</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDarkDropdown" aria-controls="navbarNavDarkDropdown" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNavDarkDropdown">
      <ul class="navbar-nav">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
            Dropdown
          </a>
          <ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">
            <li><a class="dropdown-item" href="#">Action</a></li>
            <li><a class="dropdown-item" href="#">Another action</a></li>
            <li><a class="dropdown-item" href="#">Something else here</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>

Directions

RTL

Directions are mirrored when using Bootstrap in RTL, meaning .dropstart will appear on the right side.

Dropup

Trigger dropdown menus above elements by adding .dropup to the parent element.

<!-- Default dropup button -->
<div class="btn-group dropup">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropup
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

<!-- Split dropup button -->
<div class="btn-group dropup">
  <button type="button" class="btn btn-secondary">
    Split dropup
  </button>
  <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

Dropright

Trigger dropdown menus at the right of the elements by adding .dropend to the parent element.

<!-- Default dropend button -->
<div class="btn-group dropend">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropright
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

<!-- Split dropend button -->
<div class="btn-group dropend">
  <button type="button" class="btn btn-secondary">
    Split dropend
  </button>
  <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropright</span>
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

Dropleft

Trigger dropdown menus at the left of the elements by adding .dropstart to the parent element.

<!-- Default dropstart button -->
<div class="btn-group dropstart">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropstart
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

<!-- Split dropstart button -->
<div class="btn-group">
  <div class="btn-group dropstart" role="group">
    <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
      <span class="visually-hidden">Toggle Dropstart</span>
    </button>
    <ul class="dropdown-menu">
      <!-- Dropdown menu links -->
    </ul>
  </div>
  <button type="button" class="btn btn-secondary">
    Split dropstart
  </button>
</div>

Historically dropdown menu contents had to be links, but that’s no longer the case with v4. Now you can optionally use <button> elements in your dropdowns instead of just <a>s.

<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

You can also create non-interactive dropdown items with .dropdown-item-text. Feel free to style further with custom CSS or text utilities.

<ul class="dropdown-menu">
  <li><span class="dropdown-item-text">Dropdown item text</span></li>
  <li><a class="dropdown-item" href="#">Action</a></li>
  <li><a class="dropdown-item" href="#">Another action</a></li>
  <li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>

Active

Add .active to items in the dropdown to style them as active. To convey the active state to assistive technologies, use the aria-current attribute — using the page value for the current page, or true for the current item in a set.

<ul class="dropdown-menu">
  <li><a class="dropdown-item" href="#">Regular link</a></li>
  <li><a class="dropdown-item active" href="#" aria-current="true">Active link</a></li>
  <li><a class="dropdown-item" href="#">Another link</a></li>
</ul>

Disabled

Add .disabled to items in the dropdown to style them as disabled.

<ul class="dropdown-menu">
  <li><a class="dropdown-item" href="#">Regular link</a></li>
  <li><a class="dropdown-item disabled" href="#" tabindex="-1" aria-disabled="true">Disabled link</a></li>
  <li><a class="dropdown-item" href="#">Another link</a></li>
</ul>

By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. You can change this with the directional .drop* classes, but you can also control them with additional modifier classes.

Add .dropdown-menu-end to a .dropdown-menu to right align the dropdown menu. Directions are mirrored when using Bootstrap in RTL, meaning .dropdown-menu-end will appear on the left side.

Heads up! Dropdowns are positioned thanks to Popper except when they are contained in a navbar.
<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Right-aligned menu example
  </button>
  <ul class="dropdown-menu dropdown-menu-end">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

Responsive alignment

If you want to use responsive alignment, disable dynamic positioning by adding the data-bs-display="static" attribute and use the responsive variation classes.

To align right the dropdown menu with the given breakpoint or larger, add .dropdown-menu{-sm|-md|-lg|-xl|-xxl}-end.

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Left-aligned but right aligned when large screen
  </button>
  <ul class="dropdown-menu dropdown-menu-lg-end">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

To align left the dropdown menu with the given breakpoint or larger, add .dropdown-menu-end and .dropdown-menu{-sm|-md|-lg|-xl|-xxl}-start.

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Right-aligned but left aligned when large screen
  </button>
  <ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

Note that you don’t need to add a data-bs-display="static" attribute to dropdown buttons in navbars, since Popper isn’t used in navbars.

Alignment options

Taking most of the options shown above, here’s a small kitchen sink demo of various dropdown alignment options in one place.

<div class="btn-group">
  <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Right-aligned menu
  </button>
  <ul class="dropdown-menu dropdown-menu-end">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Left-aligned, right-aligned lg
  </button>
  <ul class="dropdown-menu dropdown-menu-lg-end">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Right-aligned, left-aligned lg
  </button>
  <ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group dropstart">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropstart
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group dropend">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropend
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group dropup">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropup
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

Headers

Add a header to label sections of actions in any dropdown menu.

<ul class="dropdown-menu">
  <li><h6 class="dropdown-header">Dropdown header</h6></li>
  <li><a class="dropdown-item" href="#">Action</a></li>
  <li><a class="dropdown-item" href="#">Another action</a></li>
</ul>

Dividers

Separate groups of related menu items with a divider.

<ul class="dropdown-menu">
  <li><a class="dropdown-item" href="#">Action</a></li>
  <li><a class="dropdown-item" href="#">Another action</a></li>
  <li><a class="dropdown-item" href="#">Something else here</a></li>
  <li><hr class="dropdown-divider"></li>
  <li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>

Text

Place any freeform text within a dropdown menu with text and use spacing utilities. Note that you’ll likely need additional sizing styles to constrain the menu width.

<div class="dropdown-menu p-4 text-muted" style="max-width: 200px;">
  <p>
    Some example text that's free-flowing within the dropdown menu.
  </p>
  <p class="mb-0">
    And this is more example text.
  </p>
</div>

Forms

Put a form within a dropdown menu, or make it into a dropdown menu, and use margin or padding utilities to give it the negative space you require.

<div class="dropdown-menu">
  <form class="px-4 py-3">
    <div class="mb-3">
      <label for="exampleDropdownFormEmail1" class="form-label">Email address</label>
      <input type="email" class="form-control" id="exampleDropdownFormEmail1" placeholder="email@example.com">
    </div>
    <div class="mb-3">
      <label for="exampleDropdownFormPassword1" class="form-label">Password</label>
      <input type="password" class="form-control" id="exampleDropdownFormPassword1" placeholder="Password">
    </div>
    <div class="mb-3">
      <div class="form-check">
        <input type="checkbox" class="form-check-input" id="dropdownCheck">
        <label class="form-check-label" for="dropdownCheck">
          Remember me
        </label>
      </div>
    </div>
    <button type="submit" class="btn btn-primary">Sign in</button>
  </form>
  <div class="dropdown-divider"></div>
  <a class="dropdown-item" href="#">New around here? Sign up</a>
  <a class="dropdown-item" href="#">Forgot password?</a>
</div>
<form class="dropdown-menu p-4">
  <div class="mb-3">
    <label for="exampleDropdownFormEmail2" class="form-label">Email address</label>
    <input type="email" class="form-control" id="exampleDropdownFormEmail2" placeholder="email@example.com">
  </div>
  <div class="mb-3">
    <label for="exampleDropdownFormPassword2" class="form-label">Password</label>
    <input type="password" class="form-control" id="exampleDropdownFormPassword2" placeholder="Password">
  </div>
  <div class="mb-3">
    <div class="form-check">
      <input type="checkbox" class="form-check-input" id="dropdownCheck2">
      <label class="form-check-label" for="dropdownCheck2">
        Remember me
      </label>
    </div>
  </div>
  <button type="submit" class="btn btn-primary">Sign in</button>
</form>

Use data-bs-offset or data-bs-reference to change the location of the dropdown.

<div class="d-flex">
  <div class="dropdown me-1">
    <button type="button" class="btn btn-secondary dropdown-toggle" id="dropdownMenuOffset" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="10,20">
      Offset
    </button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenuOffset">
      <li><a class="dropdown-item" href="#">Action</a></li>
      <li><a class="dropdown-item" href="#">Another action</a></li>
      <li><a class="dropdown-item" href="#">Something else here</a></li>
    </ul>
  </div>
  <div class="btn-group">
    <button type="button" class="btn btn-secondary">Reference</button>
    <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" id="dropdownMenuReference" data-bs-toggle="dropdown" aria-expanded="false" data-bs-reference="parent">
      <span class="visually-hidden">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenuReference">
      <li><a class="dropdown-item" href="#">Action</a></li>
      <li><a class="dropdown-item" href="#">Another action</a></li>
      <li><a class="dropdown-item" href="#">Something else here</a></li>
      <li><hr class="dropdown-divider"></li>
      <li><a class="dropdown-item" href="#">Separated link</a></li>
    </ul>
  </div>
</div>

Sass

Variables

Variables for all dropdowns:

$dropdown-min-width:                10rem;
$dropdown-padding-x:                0;
$dropdown-padding-y:                .5rem;
$dropdown-spacer:                   .125rem;
$dropdown-font-size:                $font-size-base;
$dropdown-color:                    $body-color;
$dropdown-bg:                       $white;
$dropdown-border-color:             rgba($black, .15);
$dropdown-border-radius:            $border-radius;
$dropdown-border-width:             $border-width;
$dropdown-inner-border-radius:      subtract($dropdown-border-radius, $dropdown-border-width);
$dropdown-divider-bg:               $dropdown-border-color;
$dropdown-divider-margin-y:         $spacer / 2;
$dropdown-box-shadow:               $box-shadow;

$dropdown-link-color:               $gray-900;
$dropdown-link-hover-color:         shade-color($gray-900, 10%);
$dropdown-link-hover-bg:            $gray-200;

$dropdown-link-active-color:        $component-active-color;
$dropdown-link-active-bg:           $component-active-bg;

$dropdown-link-disabled-color:      $gray-500;

$dropdown-item-padding-y:           $spacer / 4;
$dropdown-item-padding-x:           $spacer;

$dropdown-header-color:             $gray-600;
$dropdown-header-padding:           $dropdown-padding-y $dropdown-item-padding-x;

Variables for the dark dropdown:

$dropdown-dark-color:               $gray-300;
$dropdown-dark-bg:                  $gray-800;
$dropdown-dark-border-color:        $dropdown-border-color;
$dropdown-dark-divider-bg:          $dropdown-divider-bg;
$dropdown-dark-box-shadow:          null;
$dropdown-dark-link-color:          $dropdown-dark-color;
$dropdown-dark-link-hover-color:    $white;
$dropdown-dark-link-hover-bg:       rgba($white, .15);
$dropdown-dark-link-active-color:   $dropdown-link-active-color;
$dropdown-dark-link-active-bg:      $dropdown-link-active-bg;
$dropdown-dark-link-disabled-color: $gray-500;
$dropdown-dark-header-color:        $gray-500;

Variables for the CSS-based carets that indicate a dropdown’s interactivity:

$caret-width:                 .3em;
$caret-vertical-align:        $caret-width * .85;
$caret-spacing:               $caret-width * .85;

Mixins

Mixins are used to generate the CSS-based carets and can be found in scss/mixins/_caret.scss.

@mixin caret-down {
  border-top: $caret-width solid;
  border-right: $caret-width solid transparent;
  border-bottom: 0;
  border-left: $caret-width solid transparent;
}

@mixin caret-up {
  border-top: 0;
  border-right: $caret-width solid transparent;
  border-bottom: $caret-width solid;
  border-left: $caret-width solid transparent;
}

@mixin caret-end {
  border-top: $caret-width solid transparent;
  border-right: 0;
  border-bottom: $caret-width solid transparent;
  border-left: $caret-width solid;
}

@mixin caret-start {
  border-top: $caret-width solid transparent;
  border-right: $caret-width solid;
  border-bottom: $caret-width solid transparent;
}

@mixin caret($direction: down) {
  @if $enable-caret {
    &::after {
      display: inline-block;
      margin-left: $caret-spacing;
      vertical-align: $caret-vertical-align;
      content: "";
      @if $direction == down {
        @include caret-down();
      } @else if $direction == up {
        @include caret-up();
      } @else if $direction == end {
        @include caret-end();
      }
    }

    @if $direction == start {
      &::after {
        display: none;
      }

      &::before {
        display: inline-block;
        margin-right: $caret-spacing;
        vertical-align: $caret-vertical-align;
        content: "";
        @include caret-start();
      }
    }

    &:empty::after {
      margin-left: 0;
    }
  }
}

Usage

Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the .show class on the parent .dropdown-menu. The data-bs-toggle="dropdown" attribute is relied on for closing dropdown menus at an application level, so it’s a good idea to always use it.

On touch-enabled devices, opening a dropdown adds empty mouseover handlers to the immediate children of the <body> element. This admittedly ugly hack is necessary to work around a quirk in iOS' event delegation, which would otherwise prevent a tap anywhere outside of the dropdown from triggering the code that closes the dropdown. Once the dropdown is closed, these additional empty mouseover handlers are removed.

Via data attributes

Add data-bs-toggle="dropdown" to a link or button to toggle a dropdown.

<div class="dropdown">
  <button id="dLabel" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown trigger
  </button>
  <ul class="dropdown-menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>

Via JavaScript

Call the dropdowns via JavaScript:

var dropdownElementList = [].slice.call(document.querySelectorAll('.dropdown-toggle'))
var dropdownList = dropdownElementList.map(function (dropdownToggleEl) {
  return new bootstrap.Dropdown(dropdownToggleEl)
})
data-bs-toggle="dropdown" still required

Regardless of whether you call your dropdown via JavaScript or instead use the data-api, data-bs-toggle="dropdown" is always required to be present on the dropdown’s trigger element.

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-bs-, as in data-bs-offset="".

Name Type Default Description
boundary string | element 'clippingParents' Overflow constraint boundary of the dropdown menu. By default it's 'clippingParents' and can accept an HTMLElement reference (JavaScript only). For more information refer to Popper's preventOverflow docs.
reference string | element | object 'toggle' Reference element of the dropdown menu. Accepts the values of 'toggle', 'parent', an HTMLElement reference or an object providing getBoundingClientRect. For more information refer to Popper's constructor docs and virtual element docs.
display string 'dynamic' By default, we use Popper for dynamic positioning. Disable this with static.
offset array | string | function [0, 2]

Offset of the dropdown relative to its target. You can pass a string in data attributes with comma separated values like: data-bs-offset="10,20"

When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: [skidding, distance].

For more information refer to Popper's offset docs.

popperConfig null | object | function null

To change Bootstrap's default Popper config, see .

When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper.

Using function with popperConfig

var dropdown = new bootstrap.Dropdown(element, {
  popperConfig: function (defaultBsPopperConfig) {
    // var newPopperConfig = {...}
    // use defaultBsPopperConfig if needed...
    // return newPopperConfig
  }
})

Methods

Method Description
toggle Toggles the dropdown menu of a given navbar or tabbed navigation.
show Shows the dropdown menu of a given navbar or tabbed navigation.
hide Hides the dropdown menu of a given navbar or tabbed navigation.
update Updates the position of an element's dropdown.
dispose Destroys an element's dropdown. (Removes stored data on the DOM element)
getInstance Static method which allows you to get the dropdown instance associated with a DOM element.

Events

All dropdown events are fired at the toggling element and then bubbled up. So you can also add event listeners on the .dropdown-menu’s parent element. hide.bs.dropdown and hidden.bs.dropdown events have a clickEvent property (only when the original Event type is click) that contains an Event Object for the click event.

Method Description
show.bs.dropdown Fires immediately when the show instance method is called.
shown.bs.dropdown Fired when the dropdown has been made visible to the user and CSS transitions have completed.
hide.bs.dropdown Fires immediately when the hide instance method has been called.
hidden.bs.dropdown Fired when the dropdown has finished being hidden from the user and CSS transitions have completed.
var myDropdown = document.getElementById('myDropdown')
myDropdown.addEventListener('show.bs.dropdown', function () {
  // do something...
})
返回頂部
亚洲一区二区三区在线播放,伊人久久精品无码av一区,亚洲国产精品一区二区第一页免,无码aⅴ精品一区二区三区浪潮
<span id="fu32q"></span>
    1. <li id="fu32q"><meter id="fu32q"><th id="fu32q"></th></meter></li>
      麻豆91在线观看| 豆国产96在线|亚洲| 日韩二区在线观看| 精品一二线国产| 国产成人亚洲精品青草天美| 国产福利不卡视频| 日韩av网站免费在线| 美女网站在线免费欧美精品| 国产精品自在在线| 日韩高清不卡在线| 成人福利电影精品一区二区在线观看| 99久久99精品久久久久久| 狠狠色狠狠色综合系列| 99v久久综合狠狠综合久久| 激情久久五月天| 高清av一区二区| 国内精品伊人久久久久av一坑 | 成人一级视频在线观看| 99精品欧美一区二区三区小说 | 奇米四色…亚洲| 粉嫩13p一区二区三区| 精品在线视频一区| 日韩国产欧美视频| aaa亚洲精品| 黄色小说综合网站| 久久99精品久久久久| 首页国产欧美久久| 成人av午夜电影| 久久99国产精品麻豆| 日韩激情一二三区| 国产成人在线色| 精品一区免费av| 日韩不卡一区二区| 92精品国产成人观看免费| 久久超碰97中文字幕| 日本不卡一二三区黄网| 国产精品一二三| 国产真实乱对白精彩久久| 日本不卡的三区四区五区| av在线这里只有精品| 成人av在线资源网| 国产精品一区二区久激情瑜伽 | 日本成人在线电影网| 国产不卡视频一区| 国产成人午夜电影网| 国产乱码精品一品二品| 国产精品一区二区91| 狠狠色综合色综合网络| 国产在线日韩欧美| 国产乱码精品1区2区3区| 日韩专区中文字幕一区二区| av一区二区三区| 成人丝袜18视频在线观看| 国产精品一区免费在线观看| 福利一区二区在线观看| 国产成人av网站| 大美女一区二区三区| 成人sese在线| 日本aⅴ亚洲精品中文乱码| 日韩不卡一区二区| 精品一区二区日韩| 韩国午夜理伦三级不卡影院| 精品综合免费视频观看| 国产91精品一区二区| 成人高清视频在线观看| 91免费视频大全| 蜜桃av一区二区在线观看| 久久国产精品99精品国产| 日韩精品三区四区| 国产在线精品一区二区三区不卡| 国产在线观看一区二区| 成人福利视频在线看| 日韩精品一二三四| 蜜桃精品视频在线观看| 国产麻豆精品95视频| av在线播放不卡| 麻豆精品在线播放| 国产91对白在线观看九色| 99精品视频一区| 久久国产婷婷国产香蕉| 国产精品综合在线视频| 99精品视频免费在线观看| 蜜臀精品一区二区三区在线观看| 天堂成人国产精品一区| 美女视频一区二区| 成人精品视频一区| 天堂在线一区二区| 久久丁香综合五月国产三级网站| 高清在线观看日韩| 久草在线在线精品观看| www.久久久久久久久| 狠狠狠色丁香婷婷综合激情 | 国产成人丝袜美腿| 秋霞午夜av一区二区三区| 国产成人午夜精品影院观看视频 | 久久国产尿小便嘘嘘| 成人午夜激情视频| 精品一区中文字幕| 成人黄色大片在线观看| 看片的网站亚洲| 成人动漫一区二区| 黄一区二区三区| 日韩和欧美一区二区| 成人精品视频一区二区三区| 国产资源精品在线观看| 日韩av中文字幕一区二区三区| 国产成人免费高清| 国产一区激情在线| 麻豆精品一二三| 91麻豆文化传媒在线观看| 国产99久久久国产精品| 国产麻豆成人精品| 国产一区二区伦理| 激情综合网最新| 免费久久99精品国产| 91麻豆蜜桃一区二区三区| 国产99久久久国产精品潘金 | 99在线热播精品免费| 国产毛片精品一区| 韩国理伦片一区二区三区在线播放 | 国产麻豆精品在线| 韩国av一区二区三区四区| 日韩国产欧美一区二区三区| yourporn久久国产精品| 成人国产精品免费观看| 国产91高潮流白浆在线麻豆 | 国产资源在线一区| 国产一区二区不卡| 国产河南妇女毛片精品久久久| 激情综合五月天| 国产麻豆精品在线| 高清在线成人网| 成人av电影在线网| 99精品视频在线播放观看| a在线欧美一区| 91麻豆蜜桃一区二区三区| 视频一区欧美日韩| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国模大尺度一区二区三区| 精品无人区卡一卡二卡三乱码免费卡| 久久精品国产久精国产爱| 麻豆国产91在线播放| 久久99精品久久久久久国产越南| 狠狠色丁香久久婷婷综合_中| 国产麻豆精品久久一二三| 国产白丝网站精品污在线入口| 国产成人亚洲综合a∨猫咪| 成人一区二区三区在线观看| av在线综合网| 免费的成人av| 国产一区二区在线电影| 国产91在线看| 日韩精品福利网| 久久精品99久久久| 成人短视频下载| 青娱乐精品视频| 国产一区二区三区av电影| 成人综合在线观看| 天堂成人国产精品一区| 久久99热这里只有精品| 成人性视频网站| 青青青爽久久午夜综合久久午夜| 国产精品系列在线播放| 99re热这里只有精品视频| 美女一区二区三区在线观看| 国产99久久久久| 美国毛片一区二区三区| 成人在线视频一区| 蜜臀精品一区二区三区在线观看| 国产成a人亚洲精品| 日韩精品一二三四| 懂色一区二区三区免费观看| 91视频精品在这里| 九九视频精品免费| 日日噜噜夜夜狠狠视频欧美人| 国产乱一区二区| 日本午夜精品一区二区三区电影| 国产盗摄一区二区三区| 久久激情五月婷婷| 成人黄色在线网站| 国产一区二区不卡| 青青草原综合久久大伊人精品优势| 国产精品一区二区黑丝| 奇米色777欧美一区二区| 粉嫩欧美一区二区三区高清影视 | 粉嫩aⅴ一区二区三区四区五区| 日韩成人一级大片| 北条麻妃一区二区三区| 国产成人午夜99999| 麻豆国产欧美日韩综合精品二区| 成人av免费观看| 国产99久久久久久免费看农村| 久久精品国产久精国产| 天堂成人国产精品一区| jvid福利写真一区二区三区| 国产伦精一区二区三区| 久草中文综合在线| 美女精品一区二区| 蜜桃精品视频在线| 秋霞电影网一区二区| 天堂成人国产精品一区| 99精品视频一区二区| 波多野结衣在线一区| 成人免费视频国产在线观看| 国产精品18久久久| 精品一区二区综合| 久久99国产乱子伦精品免费| 久久电影网站中文字幕| 久久精品国产色蜜蜜麻豆| 久久国产欧美日韩精品| 久久国产三级精品| 国产综合久久久久久鬼色| 狠狠色狠狠色综合| 国产一区二区三区四区五区美女 | 国产v综合v亚洲欧| 国产福利视频一区二区三区| 国产精品一区二区视频| 国产99久久精品| 成人久久视频在线观看| 成人禁用看黄a在线| av成人动漫在线观看| 成人91在线观看| 91丨九色丨国产丨porny| 91视频免费观看| 免费成人小视频| 狠狠色丁香久久婷婷综合_中| 奇米影视7777精品一区二区| 久久99日本精品| 国产福利91精品| 91在线观看免费视频| 日韩精品乱码免费| 精品亚洲porn| 国产宾馆实践打屁股91| 91色综合久久久久婷婷| 91美女片黄在线观看91美女| 久久精品噜噜噜成人av农村| 国产精品羞羞答答xxdd| 91丨porny丨国产| 国内外成人在线| 国精产品一区一区三区mba桃花| 国产福利91精品| 爽好久久久欧美精品| 精油按摩中文字幕久久| 成人久久久精品乱码一区二区三区| 91在线观看污| 国产一区二区调教| 99精品国产91久久久久久| 日韩主播视频在线| 国产一区二区看久久| 91在线观看免费视频| 国内一区二区视频| 91原创在线视频| 精品写真视频在线观看| 99久久精品免费精品国产| 美女一区二区视频| 成人aa视频在线观看| 精品一区二区三区在线观看| 99免费精品在线| 国产一区在线不卡| 日韩精品电影在线| 成人国产亚洲欧美成人综合网| 三级欧美在线一区| 国产经典欧美精品| 麻豆一区二区在线| 91浏览器在线视频| 成人中文字幕在线| 国产一区二区三区久久悠悠色av| 成人高清视频免费观看| 国产一区二区电影| 麻豆精品国产传媒mv男同| 99re在线视频这里只有精品| 国产伦精品一区二区三区视频青涩| 日韩高清在线不卡| 99久精品国产| 成年人国产精品| 国产成人在线免费观看| 精品一区二区免费在线观看| 丝袜美腿亚洲色图| 成人福利电影精品一区二区在线观看 | 成人精品亚洲人成在线| 国产一区在线精品| 韩日av一区二区| 激情成人综合网| 日韩国产欧美一区二区三区| 成人av在线播放网站| 国产成人免费在线视频| 国模一区二区三区白浆| 久久狠狠亚洲综合| 久久国产精品免费| 精品在线免费视频| 国内精品国产三级国产a久久| 老司机免费视频一区二区 | 91免费版在线看| 99精品欧美一区| av电影在线观看完整版一区二区| 成人精品鲁一区一区二区| 福利一区二区在线观看| 粉嫩嫩av羞羞动漫久久久| 国产成人午夜视频| 岛国精品在线观看| 成人av在线资源网站| 99久久伊人精品| 99久久99久久精品国产片果冻| av动漫一区二区| 99久久精品国产一区二区三区| 国内成人免费视频| 国产成人综合亚洲91猫咪| 粉嫩一区二区三区在线看| 成人小视频在线观看| av中文字幕在线不卡| 91香蕉视频黄| 美腿丝袜亚洲一区| 国产一区二区久久| 国产白丝精品91爽爽久久| 本田岬高潮一区二区三区| 91麻豆文化传媒在线观看| 青青草国产精品亚洲专区无| 久久99精品国产.久久久久久| 日韩激情视频在线观看| 精品一区二区在线观看| 国产成人免费在线观看不卡| 99热这里都是精品| 免费成人在线影院| 国产成人av电影在线| 91农村精品一区二区在线| 久久99精品久久久| 成人精品国产福利| 美女尤物国产一区| 成人午夜视频在线| 日韩 欧美一区二区三区| 国产一区二区三区在线观看免费| 丁香激情综合国产| 91捆绑美女网站| 国产老女人精品毛片久久| 成人免费视频国产在线观看| 日本最新不卡在线| 国产成人综合在线| 日本v片在线高清不卡在线观看| 精品一区二区三区日韩| 99久久伊人网影院| 国产一二精品视频| 91色.com| 国产精品1024| 老司机免费视频一区二区| 成人aa视频在线观看| 狠狠色伊人亚洲综合成人| 91热门视频在线观看| 国产成人在线视频免费播放| 青青草精品视频| 懂色av噜噜一区二区三区av| 捆绑调教一区二区三区| 91在线观看视频| 懂色av中文字幕一区二区三区 | 91蝌蚪国产九色| 国产福利91精品一区| 麻豆极品一区二区三区| aaa亚洲精品| 国产成人综合亚洲91猫咪| 麻豆视频一区二区| 三级欧美在线一区| 99国产精品久久久| yourporn久久国产精品| 国产麻豆成人传媒免费观看| 美女视频一区二区三区| 97国产一区二区| 成人一级视频在线观看| 久久99九九99精品| 免费观看日韩av| 91蜜桃网址入口| 97国产精品videossex| 粉嫩aⅴ一区二区三区四区 | 日韩成人免费看| 91玉足脚交白嫩脚丫在线播放| 国产成人aaaa| 国产99一区视频免费| 精品一区二区免费在线观看| 免费观看久久久4p| 免费人成精品欧美精品| 日本伊人精品一区二区三区观看方式| proumb性欧美在线观看| 成人av在线影院| 波多野结衣中文字幕一区二区三区| 国产成人自拍高清视频在线免费播放| 国内精品自线一区二区三区视频| 捆绑调教一区二区三区| 精品午夜一区二区三区在线观看| 美女精品自拍一二三四| 久久精品国产免费| 国产最新精品精品你懂的| 韩日欧美一区二区三区| 国产毛片精品视频| 国产成人亚洲精品青草天美| 成人妖精视频yjsp地址| 99久久久精品| av在线一区二区| 日韩中文字幕不卡| 久久99精品久久久久久国产越南| 韩国av一区二区三区在线观看| 久久精品999| 国产大陆精品国产|