精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

Collapse

Toggle the visibility of content across your project with a few classes and our JavaScript plugins.

How it works

The collapse JavaScript plugin is used to show and hide content. Buttons or anchors are used as triggers that are mapped to specific elements you toggle. Collapsing an element will animate the height from its current value to 0. Given how CSS handles animations, you cannot use padding on a .collapse element. Instead, use the class as an independent wrapping element.

The animation effect of this component is dependent on the prefers-reduced-motion media query. See the reduced motion section of our accessibility documentation.

Example

Click the buttons below to show and hide another element via class changes:

  • .collapse hides content
  • .collapsing is applied during transitions
  • .collapse.show shows content

Generally, we recommend using a button with the data-bs-target attribute. While not recommended from a semantic point of view, you can also use a link with the href attribute (and a role="button"). In both cases, the data-bs-toggle="collapse" is required.

Some placeholder content for the collapse component. This panel is hidden by default but revealed when the user activates the relevant trigger.
<p>
  <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
    Link with href
  </a>
  <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
    Button with data-bs-target
  </button>
</p>
<div class="collapse" id="collapseExample">
  <div class="card card-body">
    Some placeholder content for the collapse component. This panel is hidden by default but revealed when the user activates the relevant trigger.
  </div>
</div>

Multiple targets

A <button> or <a> can show and hide multiple elements by referencing them with a selector in its href or data-bs-target attribute. Multiple <button> or <a> can show and hide an element if they each reference it with their href or data-bs-target attribute

Some placeholder content for the first collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger.
Some placeholder content for the second collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger.
<p>
  <a class="btn btn-primary" data-bs-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false" aria-controls="multiCollapseExample1">Toggle first element</a>
  <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#multiCollapseExample2" aria-expanded="false" aria-controls="multiCollapseExample2">Toggle second element</button>
  <button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target=".multi-collapse" aria-expanded="false" aria-controls="multiCollapseExample1 multiCollapseExample2">Toggle both elements</button>
</p>
<div class="row">
  <div class="col">
    <div class="collapse multi-collapse" id="multiCollapseExample1">
      <div class="card card-body">
        Some placeholder content for the first collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger.
      </div>
    </div>
  </div>
  <div class="col">
    <div class="collapse multi-collapse" id="multiCollapseExample2">
      <div class="card card-body">
        Some placeholder content for the second collapse component of this multi-collapse example. This panel is hidden by default but revealed when the user activates the relevant trigger.
      </div>
    </div>
  </div>
</div>

Accessibility

Be sure to add aria-expanded to the control element. This attribute explicitly conveys the current state of the collapsible element tied to the control to screen readers and similar assistive technologies. If the collapsible element is closed by default, the attribute on the control element should have a value of aria-expanded="false". If you’ve set the collapsible element to be open by default using the show class, set aria-expanded="true" on the control instead. The plugin will automatically toggle this attribute on the control based on whether or not the collapsible element has been opened or closed (via JavaScript, or because the user triggered another control element also tied to the same collapsible element). If the control element’s HTML element is not a button (e.g., an <a> or <div>), the attribute role="button" should be added to the element.

If your control element is targeting a single collapsible element – i.e. the data-bs-target attribute is pointing to an id selector – you should add the aria-controls attribute to the control element, containing the id of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.

Note that Bootstrap’s current implementation does not cover the various optional keyboard interactions described in the WAI-ARIA Authoring Practices 1.1 accordion pattern - you will need to include these yourself with custom JavaScript.

Sass

Variables

$transition-collapse:         height .35s ease;

Classes

Collapse transition classes can be found in scss/_transitions.scss as these are shared across multiple components (collapse and accordion).

.collapse {
  &:not(.show) {
    display: none;
  }
}

.collapsing {
  height: 0;
  overflow: hidden;
  @include transition($transition-collapse);
}

Usage

The collapse plugin utilizes a few classes to handle the heavy lifting:

  • .collapse hides the content
  • .collapse.show shows the content
  • .collapsing is added when the transition starts, and removed when it finishes

These classes can be found in _transitions.scss.

Via data attributes

Just add data-bs-toggle="collapse" and a data-bs-target to the element to automatically assign control of one or more collapsible elements. The data-bs-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you’d like it to default open, add the additional class show.

To add accordion-like group management to a collapsible area, add the data attribute data-bs-parent="#selector". Refer to the demo to see this in action.

Via JavaScript

Enable manually with:

var collapseElementList = [].slice.call(document.querySelectorAll('.collapse'))
var collapseList = collapseElementList.map(function (collapseEl) {
  return new bootstrap.Collapse(collapseEl)
})

Options

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

Name Type Default Description
parent selector | jQuery object | DOM element false If parent is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the card class). The attribute has to be set on the target collapsible area.
toggle boolean true Toggles the collapsible element on invocation

Methods

Asynchronous methods and transitions

All API methods are asynchronous and start a transition. They return to the caller as soon as the transition is started but before it ends. In addition, a method call on a transitioning component will be ignored.

See our JavaScript documentation for more information.

Activates your content as a collapsible element. Accepts an optional options object.

You can create a collapse instance with the constructor, for example:

var myCollapse = document.getElementById('myCollapse')
var bsCollapse = new bootstrap.Collapse(myCollapse, {
  toggle: false
})
Method Description
toggle Toggles a collapsible element to shown or hidden. Returns to the caller before the collapsible element has actually been shown or hidden (i.e. before the shown.bs.collapse or hidden.bs.collapse event occurs).
show Shows a collapsible element. Returns to the caller before the collapsible element has actually been shown (e.g., before the shown.bs.collapse event occurs).
hide Hides a collapsible element. Returns to the caller before the collapsible element has actually been hidden (e.g., before the hidden.bs.collapse event occurs).
dispose Destroys an element's collapse. (Removes stored data on the DOM element)
getInstance Static method which allows you to get the collapse instance associated with a DOM element.

Events

Bootstrap’s collapse class exposes a few events for hooking into collapse functionality.

Event type Description
show.bs.collapse This event fires immediately when the show instance method is called.
shown.bs.collapse This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.collapse This event is fired immediately when the hide method has been called.
hidden.bs.collapse This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).
var myCollapsible = document.getElementById('myCollapsible')
myCollapsible.addEventListener('hidden.bs.collapse', function () {
  // do something...
})
返回頂部
精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

      9000px;">

          亚洲欧洲美洲综合色网| 久久新电视剧免费观看| 国产91丝袜在线观看| 日韩1区2区3区| 亚洲一区二区中文在线| 亚洲黄色av一区| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 日本美女一区二区三区| 亚洲午夜视频在线观看| 中文av字幕一区| 国产三级一区二区| 国产欧美一区二区精品久导航| 日韩亚洲欧美高清| 欧美大片免费久久精品三p| 日韩一区二区电影在线| xf在线a精品一区二区视频网站| 欧美日韩一卡二卡三卡| 欧美日韩高清一区二区| 3d动漫精品啪啪一区二区竹菊| 在线播放一区二区三区| 日韩美女一区二区三区| 久久综合九色综合欧美亚洲| 欧美电影免费观看高清完整版在线观看 | 亚洲欧洲美洲综合色网| 一区二区三区在线看| 午夜精品一区二区三区电影天堂 | 国产亚洲综合色| 国产精品久线在线观看| 亚洲一线二线三线视频| 天天操天天干天天综合网| 麻豆成人久久精品二区三区小说| 国产美女娇喘av呻吟久久| 国产99久久精品| 欧美最新大片在线看 | 成人av免费在线观看| 欧美三级午夜理伦三级中视频| 日韩午夜在线影院| 欧美国产精品v| 天堂va蜜桃一区二区三区漫画版| 国产在线精品一区二区三区不卡| 国产成人综合亚洲网站| 在线免费亚洲电影| 精品国产成人系列| 夜夜精品视频一区二区| 国产在线精品一区在线观看麻豆| 99久久伊人精品| 欧美一区二区网站| 国产精品高清亚洲| 久久国产麻豆精品| 色综合久久天天| 久久久精品人体av艺术| 视频一区在线播放| 91国模大尺度私拍在线视频| 精品久久久久av影院| 亚洲综合视频网| 成人免费视频视频| 久久久久久99久久久精品网站| 亚洲资源中文字幕| 91亚洲永久精品| 久久色成人在线| 免费观看久久久4p| 在线精品视频一区二区三四| 国产精品久久久久影院亚瑟| 久久99深爱久久99精品| 69堂精品视频| 午夜影院久久久| 一本久道久久综合中文字幕| 久久精品视频一区| 久久99国产精品尤物| 欧美精品久久一区二区三区| 亚洲另类在线视频| 色婷婷av久久久久久久| 中文字幕国产精品一区二区| 黄网站免费久久| 91精品国产手机| 日本午夜一区二区| 3d成人动漫网站| 亚洲成人高清在线| 欧美色视频在线观看| 亚洲最新在线观看| 欧美亚洲高清一区二区三区不卡| 亚洲免费观看高清| 色综合久久综合| 亚洲一区二区视频| 欧美精品第一页| 欧美aaa在线| 欧美精品一区二区三区一线天视频 | 亚洲男帅同性gay1069| 91视频免费观看| 亚洲综合一区二区三区| 欧美日本韩国一区二区三区视频| 亚洲一区视频在线| 欧美精品久久一区| 激情综合色播五月| 国产欧美精品一区| 91香蕉视频黄| 日日夜夜免费精品视频| 精品日韩一区二区三区免费视频| 精品一区二区三区免费毛片爱| 欧美精品一区二区三区在线播放| 国产精品99久久久久久有的能看| 国产女人aaa级久久久级 | 337p亚洲精品色噜噜噜| 国产一区二区中文字幕| 自拍偷在线精品自拍偷无码专区 | 日韩不卡手机在线v区| 久久久影视传媒| 99久久综合精品| 青青青伊人色综合久久| 国产午夜精品一区二区| 91在线观看成人| 青青草91视频| 亚洲欧美综合色| 欧美一区二区三区视频在线观看| 国产成人av福利| 亚洲成av人片观看| 欧美国产97人人爽人人喊| 精品婷婷伊人一区三区三| 国产一区二区主播在线| 一区二区三区国产| 国产欧美日韩不卡| 在线视频一区二区三区| 国产一区二区三区av电影 | 久久国产精品色| 亚洲黄色免费网站| 国产欧美日韩麻豆91| 欧美日本精品一区二区三区| 懂色av一区二区三区蜜臀| 日韩二区在线观看| 亚洲欧美日韩国产一区二区三区| 精品第一国产综合精品aⅴ| 色系网站成人免费| 成人免费看黄yyy456| 精油按摩中文字幕久久| 亚洲精品久久嫩草网站秘色| 欧美韩日一区二区三区四区| 欧美精品一级二级三级| 91国偷自产一区二区开放时间| 国产精品一二三四| 久久精品国产99| 日韩不卡免费视频| 午夜国产不卡在线观看视频| 亚洲日本电影在线| 国产精品久久久久久久久免费樱桃| 日韩精品一区在线观看| 欧美一二三四在线| 制服视频三区第一页精品| 欧美日韩三级一区二区| 一本一本久久a久久精品综合麻豆| 国模一区二区三区白浆| 免费观看在线综合| 美脚の诱脚舐め脚责91| 午夜不卡av在线| 天天综合网天天综合色| 亚洲成人av一区二区三区| 亚洲一区二区欧美| 亚洲主播在线观看| 亚洲夂夂婷婷色拍ww47| 亚洲宅男天堂在线观看无病毒| 亚洲日本丝袜连裤袜办公室| 亚洲女人****多毛耸耸8| 亚洲欧美欧美一区二区三区| 亚洲码国产岛国毛片在线| 亚洲在线视频网站| 五月婷婷综合在线| 天天综合网 天天综合色| 天堂午夜影视日韩欧美一区二区| 石原莉奈在线亚洲三区| 蜜桃视频第一区免费观看| 久99久精品视频免费观看| 理论片日本一区| 成熟亚洲日本毛茸茸凸凹| 97久久超碰精品国产| 在线视频综合导航| 日韩三级伦理片妻子的秘密按摩| 精品国产自在久精品国产| 欧美激情综合五月色丁香小说| 国产精品久久二区二区| 亚洲一区二区三区四区在线| 美女视频第一区二区三区免费观看网站 | 亚洲一区二区偷拍精品| 免费视频最近日韩| 波多野洁衣一区| 欧洲一区在线观看| xf在线a精品一区二区视频网站| 国产欧美视频一区二区三区| 亚洲精品视频免费看| 日韩国产欧美在线视频| 大胆欧美人体老妇| 欧美体内she精高潮| 26uuu精品一区二区三区四区在线| 中文字幕av一区二区三区免费看| 一区二区三区在线看| 日韩avvvv在线播放| 99精品桃花视频在线观看| 91精品国产福利| 亚洲免费观看高清完整版在线 | 国产成人h网站| 日韩一级免费一区| 国产精品久久久久久久久免费桃花|