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

Carousel

A slideshow component for cycling through elements—images or slides of text—like a carousel.

How it works

The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators.

In browsers where the Page Visibility API is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.).

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

Please be aware that nested carousels are not supported, and carousels are generally not compliant with accessibility standards.

Example

Carousels don’t automatically normalize slide dimensions. As such, you may need to use additional utilities or custom styles to appropriately size content. While carousels support previous/next controls and indicators, they’re not explicitly required. Add and customize as you see fit.

The .active class needs to be added to one of the slides otherwise the carousel will not be visible. Also be sure to set a unique id on the .carousel for optional controls, especially if you’re using multiple carousels on a single page. Control and indicator elements must have a data-bs-target attribute (or href for links) that matches the id of the .carousel element.

Slides only

Here’s a carousel with slides only. Note the presence of the .d-block and .w-100 on carousel images to prevent browser default image alignment.

<div id="carouselExampleSlidesOnly" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
  </div>
</div>

With controls

Adding in the previous and next controls. We recommend using <button> elements, but you can also use <a> elements with role="button".

<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

With indicators

You can also add the indicators to the carousel, alongside the controls, too.

<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-indicators">
    <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
    <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button>
    <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2" aria-label="Slide 3"></button>
  </div>
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

With captions

Add captions to your slides easily with the .carousel-caption element within any .carousel-item. They can be easily hidden on smaller viewports, as shown below, with optional display utilities. We hide them initially with .d-none and bring them back on medium-sized devices with .d-md-block.

<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-indicators">
    <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
    <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button>
    <button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2" aria-label="Slide 3"></button>
  </div>
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="..." class="d-block w-100" alt="...">
      <div class="carousel-caption d-none d-md-block">
        <h5>First slide label</h5>
        <p>Some representative placeholder content for the first slide.</p>
      </div>
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
      <div class="carousel-caption d-none d-md-block">
        <h5>Second slide label</h5>
        <p>Some representative placeholder content for the second slide.</p>
      </div>
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
      <div class="carousel-caption d-none d-md-block">
        <h5>Third slide label</h5>
        <p>Some representative placeholder content for the third slide.</p>
      </div>
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

Crossfade

Add .carousel-fade to your carousel to animate slides with a fade transition instead of a slide.

<div id="carouselExampleFade" class="carousel slide carousel-fade" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

Add data-bs-interval="" to a .carousel-item to change the amount of time to delay between automatically cycling to the next item.

<div id="carouselExampleInterval" class="carousel slide" data-bs-ride="carousel">
  <div class="carousel-inner">
    <div class="carousel-item active" data-bs-interval="10000">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item" data-bs-interval="2000">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleInterval" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleInterval" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

Disable touch swiping

Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled using the data-bs-touch attribute. The example below also does not include the data-bs-ride attribute and has data-bs-interval="false" so it doesn’t autoplay.

<div id="carouselExampleControlsNoTouching" class="carousel slide" data-bs-touch="false" data-bs-interval="false">
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControlsNoTouching" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControlsNoTouching" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

Dark variant

Add .carousel-dark to the .carousel for darker controls, indicators, and captions. Controls have been inverted from their default white fill with the filter CSS property. Captions and controls have additional Sass variables that customize the color and background-color.

<div id="carouselExampleDark" class="carousel carousel-dark slide" data-bs-ride="carousel">
  <div class="carousel-indicators">
    <button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
    <button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="1" aria-label="Slide 2"></button>
    <button type="button" data-bs-target="#carouselExampleDark" data-bs-slide-to="2" aria-label="Slide 3"></button>
  </div>
  <div class="carousel-inner">
    <div class="carousel-item active" data-bs-interval="10000">
      <img src="..." class="d-block w-100" alt="...">
      <div class="carousel-caption d-none d-md-block">
        <h5>First slide label</h5>
        <p>Some representative placeholder content for the first slide.</p>
      </div>
    </div>
    <div class="carousel-item" data-bs-interval="2000">
      <img src="..." class="d-block w-100" alt="...">
      <div class="carousel-caption d-none d-md-block">
        <h5>Second slide label</h5>
        <p>Some representative placeholder content for the second slide.</p>
      </div>
    </div>
    <div class="carousel-item">
      <img src="..." class="d-block w-100" alt="...">
      <div class="carousel-caption d-none d-md-block">
        <h5>Third slide label</h5>
        <p>Some representative placeholder content for the third slide.</p>
      </div>
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Previous</span>
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleDark" data-bs-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="visually-hidden">Next</span>
  </button>
</div>

Custom transition

The transition duration of .carousel-item can be changed with the $carousel-transition-duration Sass variable before compiling or custom styles if you’re using the compiled CSS. If multiple transitions are applied, make sure the transform transition is defined first (eg. transition: transform 2s ease, opacity .5s ease-out).

Sass

Variables

$carousel-control-color:             $white;
$carousel-control-width:             15%;
$carousel-control-opacity:           .5;
$carousel-control-hover-opacity:     .9;
$carousel-control-transition:        opacity .15s ease;

$carousel-indicator-width:           30px;
$carousel-indicator-height:          3px;
$carousel-indicator-hit-area-height: 10px;
$carousel-indicator-spacer:          3px;
$carousel-indicator-opacity:         .5;
$carousel-indicator-active-bg:       $white;
$carousel-indicator-active-opacity:  1;
$carousel-indicator-transition:      opacity .6s ease;

$carousel-caption-width:             70%;
$carousel-caption-color:             $white;
$carousel-caption-padding-y:         1.25rem;
$carousel-caption-spacer:            1.25rem;

$carousel-control-icon-width:        2rem;

$carousel-control-prev-icon-bg:      url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/></svg>");
$carousel-control-next-icon-bg:      url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$carousel-control-color}'><path d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/></svg>");

$carousel-transition-duration:       .6s;
$carousel-transition:                transform $carousel-transition-duration ease-in-out; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)

$carousel-dark-indicator-active-bg:  $black;
$carousel-dark-caption-color:        $black;
$carousel-dark-control-icon-filter:  invert(1) grayscale(100);

Usage

Via data attributes

Use data attributes to easily control the position of the carousel. data-bs-slide accepts the keywords prev or next, which alters the slide position relative to its current position. Alternatively, use data-bs-slide-to to pass a raw slide index to the carousel data-bs-slide-to="2", which shifts the slide position to a particular index beginning with 0.

The data-bs-ride="carousel" attribute is used to mark a carousel as animating starting at page load. If you don’t use data-bs-ride="carousel" to initialize your carousel, you have to initialize it yourself. It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel.

Via JavaScript

Call carousel manually with:

var myCarousel = document.querySelector('#myCarousel')
var carousel = new bootstrap.Carousel(myCarousel)

Options

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

Name Type Default Description
interval number 5000 The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
keyboard boolean true Whether the carousel should react to keyboard events.
pause string | boolean 'hover'

If set to 'hover', pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to false, hovering over the carousel won't pause it.

On touch-enabled devices, when set to 'hover', cycling will pause on touchend (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.

ride string | boolean false Autoplays the carousel after the user manually cycles the first item. If set to 'carousel', autoplays the carousel on load.
wrap boolean true Whether the carousel should cycle continuously or have hard stops.
touch boolean true Whether the carousel should support left/right swipe interactions on touchscreen devices.

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.

You can create a carousel instance with the carousel constructor, for example, to initialize with additional options and start cycling through items:

var myCarousel = document.querySelector('#myCarousel')
var carousel = new bootstrap.Carousel(myCarousel, {
  interval: 2000,
  wrap: false
})
Method Description
cycle Cycles through the carousel items from left to right.
pause Stops the carousel from cycling through items.
prev Cycles to the previous item. Returns to the caller before the previous item has been shown (e.g., before the slid.bs.carousel event occurs).
next Cycles to the next item. Returns to the caller before the next item has been shown (e.g., before the slid.bs.carousel event occurs).
nextWhenVisible Don't cycle carousel to next when the page isn't visible or the carousel or its parent isn't visible. Returns to the caller before the target item has been shown
to Cycles the carousel to a particular frame (0 based, similar to an array). Returns to the caller before the target item has been shown (e.g., before the slid.bs.carousel event occurs).
dispose Destroys an element's carousel. (Removes stored data on the DOM element)
getInstance Static method which allows you to get the carousel instance associated with a DOM element.

Events

Bootstrap’s carousel class exposes two events for hooking into carousel functionality. Both events have the following additional properties:

  • direction: The direction in which the carousel is sliding (either "left" or "right").
  • relatedTarget: The DOM element that is being slid into place as the active item.
  • from: The index of the current item
  • to: The index of the next item

All carousel events are fired at the carousel itself (i.e. at the <div class="carousel">).

Event type Description
slide.bs.carousel Fires immediately when the slide instance method is invoked.
slid.bs.carousel Fired when the carousel has completed its slide transition.
var myCarousel = document.getElementById('myCarousel')

myCarousel.addEventListener('slide.bs.carousel', function () {
  // do something...
})
返回頂部
精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

      9000px;">

          欧美精品一区男女天堂| 最新高清无码专区| 久久久精品黄色| 亚洲视频一区二区免费在线观看| 午夜精品久久久久久久蜜桃app| 国产精品18久久久久久久久| 欧美在线观看视频一区二区三区| 久久综合色鬼综合色| 亚洲福利视频三区| 成人亚洲一区二区一| 欧美一区二区网站| 亚洲黄色小说网站| 成人一级黄色片| 久久天堂av综合合色蜜桃网| 亚洲国产视频直播| 91在线观看下载| 久久免费电影网| 人禽交欧美网站| 欧美日韩一级黄| 综合久久一区二区三区| 国产福利91精品一区| 日韩免费观看高清完整版在线观看| 亚洲精品日产精品乱码不卡| 久久精品久久99精品久久| 欧美午夜精品理论片a级按摩| 国产精品天美传媒| 国产成人精品一区二区三区四区 | 欧美午夜电影网| 亚洲女同女同女同女同女同69| 国产成人小视频| 久久久久久麻豆| 国产在线精品国自产拍免费| 51久久夜色精品国产麻豆| 亚洲一区二区欧美| 91久久人澡人人添人人爽欧美| 亚洲国产精品成人综合| 国产福利一区二区三区视频 | 国产麻豆精品在线观看| 26uuu久久综合| 国产盗摄精品一区二区三区在线| 26uuu国产电影一区二区| 国产一区二区三区久久悠悠色av| 精品国产髙清在线看国产毛片| 日本怡春院一区二区| 91精品国产综合久久福利软件 | 狠狠久久亚洲欧美| 国产色产综合色产在线视频| 国产精品福利一区| 中文字幕中文在线不卡住| 午夜伦欧美伦电影理论片| 国产·精品毛片| 欧美一级片免费看| 亚洲欧美偷拍另类a∨色屁股| 日韩高清在线电影| 韩国av一区二区三区在线观看| 久久久青草青青国产亚洲免观| 国产激情一区二区三区| 亚洲精品欧美综合四区| 91精品福利在线一区二区三区 | 国产日韩亚洲欧美综合| 成人黄色片在线观看| 亚洲久草在线视频| 日韩一级片网址| 不卡一区二区三区四区| 亚洲一区二区三区小说| 精品播放一区二区| 91性感美女视频| 午夜精品一区二区三区三上悠亚| 欧美一级黄色片| 成人午夜视频免费看| 午夜精品在线视频一区| 国精品**一区二区三区在线蜜桃 | 久久综合九色综合欧美就去吻| 99久久er热在这里只有精品15| 日韩精品色哟哟| 国产精品久久久久一区二区三区共| 欧美日韩一区二区三区免费看 | 免费欧美在线视频| 国产精品素人视频| 日韩三级视频在线看| 不卡视频一二三| 蜜臀精品一区二区三区在线观看 | 日韩电影免费在线看| 久久精品日韩一区二区三区| 日本韩国精品在线| 国产一区二区伦理片| 亚洲成人自拍网| 中文字幕欧美一| 久久综合av免费| 欧美日韩综合不卡| 一本一本久久a久久精品综合麻豆| 久久精品国产免费| 亚洲妇女屁股眼交7| 综合分类小说区另类春色亚洲小说欧美| 日韩欧美中文字幕一区| 日本韩国一区二区三区| 99视频在线精品| 国产suv精品一区二区883| 久久国产夜色精品鲁鲁99| 亚洲国产一区二区三区青草影视| 中文字幕五月欧美| 久久久噜噜噜久噜久久综合| 7777精品伊人久久久大香线蕉| 亚洲不卡av一区二区三区| 99精品国产99久久久久久白柏| 亚洲精品日日夜夜| 欧美一区二区免费观在线| 国产九色sp调教91| 亚洲一区二区在线播放相泽| 日韩三级视频在线看| 亚洲成av人片在www色猫咪| 日韩午夜激情免费电影| 欧美日韩激情一区| 欧美日韩在线播| 欧美优质美女网站| 欧美视频日韩视频| 7777精品伊人久久久大香线蕉| 69堂亚洲精品首页| 日韩免费高清视频| 欧美精品一区二区在线播放 | 中文字幕免费不卡在线| 国产欧美精品一区二区色综合 | 91浏览器打开| 欧美色网一区二区| 欧美狂野另类xxxxoooo| 欧美精品高清视频| 日韩免费高清视频| 国产日韩欧美不卡| 国产精品短视频| 亚洲资源在线观看| 日韩激情中文字幕| 久久精品久久精品| 成人一区二区三区视频在线观看| 成人一道本在线| 91久久精品网| 91精品国产欧美一区二区成人| 日韩欧美资源站| 国产精品女人毛片| 亚洲精品日韩专区silk| 免费在线观看精品| 国产福利一区二区三区视频 | 亚洲午夜精品网| 免费成人在线观看| 国产高清久久久久| aaa欧美大片| 欧美日韩激情一区二区三区| 精品国产乱码久久久久久久久| 欧美激情在线看| 亚洲五码中文字幕| 精品一区二区三区的国产在线播放| 国产一区美女在线| 色综合久久中文综合久久97| 欧美一区二区三区在| 欧美极品xxx| 亚洲电影你懂得| 国产精品18久久久久久久久| 欧美在线观看一区二区| 26uuu亚洲综合色欧美| 樱桃国产成人精品视频| 另类综合日韩欧美亚洲| 波多野结衣一区二区三区| 欧美日韩大陆在线| 亚洲国产精品成人综合 | 欧美大胆一级视频| 亚洲精品欧美专区| 国产精品一线二线三线精华| 欧美亚洲高清一区| 日本一区二区高清| 人人爽香蕉精品| 久久夜色精品一区| 中文欧美字幕免费| 亚洲男人的天堂网| 日韩二区在线观看| 精品一二三四在线| 91在线精品一区二区三区| 在线电影院国产精品| 久久综合九色综合97_久久久 | www亚洲一区| 天天综合天天综合色| 欧美在线视频你懂得| 中文字幕一区在线观看| 国产毛片精品国产一区二区三区| 精品视频全国免费看| 国产精品国产三级国产aⅴ原创| 久久99精品国产| 欧美一级日韩免费不卡| 午夜精品影院在线观看| 欧美亚洲综合网| 亚洲国产精品尤物yw在线观看| 一本大道久久精品懂色aⅴ| 国产精品毛片久久久久久| 国产成人av一区| 中文字幕乱码一区二区免费| 国产精品乡下勾搭老头1| 精品入口麻豆88视频| 免费在线看成人av| 在线91免费看| 极品少妇一区二区三区精品视频| 91精品国产色综合久久不卡电影| 日韩精品欧美精品|