精品久久久久久亚洲精品_成人午夜网站_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日本高清_亚洲精品久久久久午夜福

      狠狠色狠色综合曰曰| 欧美激情精品久久久久久大尺度| 免费欧美日韩国产三级电影| 国产精品免费看久久久香蕉| 亚洲精选大片| 国产精品va在线播放| 亚洲精品视频免费观看| 欧美精品免费播放| 亚洲黄色一区二区三区| 久久久99免费视频| 在线精品观看| 欧美视频在线观看视频极品| 亚洲欧美日韩视频二区| 国产亚洲一区在线播放| 久久久精品视频成人| 亚洲国产激情| 国产精品久久久久999| 欧美影院在线| 亚洲性线免费观看视频成熟| 国产一区二区三区四区在线观看| 欧美freesex交免费视频| 亚洲深夜福利| 一区二区三区精密机械公司| 亚洲成人在线观看视频| 国产夜色精品一区二区av| 欧美视频一区二区在线观看| 欧美激情亚洲激情| 女女同性精品视频| 久久蜜臀精品av| 欧美一区三区三区高中清蜜桃| 亚洲毛片在线观看| 一本色道久久综合一区| 免费亚洲电影| 久久亚洲春色中文字幕久久久| 韩国精品一区二区三区| 亚洲午夜极品| 亚洲午夜精品一区二区三区他趣| 国精品一区二区| 国产视频在线观看一区二区| 国产精品成人一区二区艾草| 欧美国产日韩亚洲一区| 欧美高清影院| 国产精品一区二区女厕厕| 国产精品一区二区在线观看网站| 欧美日韩国产一区二区| 国产日本欧美一区二区三区| 国产伦一区二区三区色一情| 在线成人h网| 亚洲午夜激情免费视频| 亚洲一区二区精品在线| 欧美一区影院| 欧美日韩hd| 国产香蕉97碰碰久久人人| 最近中文字幕日韩精品| 亚洲一区欧美一区| 欧美成人免费小视频| 国产一区二区按摩在线观看| 9色精品在线| 欧美成人三级在线| 国语自产精品视频在线看| 99ri日韩精品视频| 久久久久久久高潮| 国产日韩专区在线| 翔田千里一区二区| 欧美午夜精品久久久久久超碰| 伊人久久亚洲热| 午夜精品福利一区二区蜜股av| 欧美成人资源网| 亚洲国产专区校园欧美| 久久久综合网| 亚洲国产福利在线| 欧美α欧美αv大片| 亚洲人人精品| 国产精品午夜春色av| 午夜欧美精品久久久久久久| 国产精品任我爽爆在线播放| 亚洲自拍偷拍麻豆| 激情欧美一区二区三区| 久久在精品线影院精品国产| 1024成人网色www| 欧美日韩国产123| 欧美自拍偷拍午夜视频| 国产一区二区三区久久久| 欧美精品乱码久久久久久按摩| 一区二区三区日韩欧美| 国产美女精品视频| 欧美成人情趣视频| 亚洲欧美日本国产有色| 在线国产日韩| 国产情人节一区| 亚洲在线观看| 国产精品日韩在线一区| 卡一卡二国产精品| 午夜精品av| 亚洲综合999| 一区二区三区高清不卡| …久久精品99久久香蕉国产| 欧美三级日本三级少妇99| 午夜视频一区| 久久黄色网页| 久久精品亚洲一区二区三区浴池| 亚洲欧美美女| 午夜精品一区二区三区四区 | 欧美激情精品久久久久久免费印度 | 国产免费亚洲高清| 国产精品福利久久久| 久久全球大尺度高清视频| 亚洲一区免费视频| 99精品国产99久久久久久福利| 在线观看91精品国产麻豆| 在线观看福利一区| 好看的日韩av电影| 在线欧美影院| 91久久精品国产91久久性色tv| 狠狠色综合色综合网络| 在线日韩av| 日韩午夜在线电影| 亚洲欧美日韩爽爽影院| 性色一区二区三区| 久久久久久有精品国产| 久久久av毛片精品| 欧美国产精品劲爆| 国产精品黄页免费高清在线观看| 欧美午夜精品久久久久免费视 | 亚洲欧洲三级电影| 日韩一级视频免费观看在线| 一区二区国产精品| 久久精品91久久久久久再现| 欧美激情自拍| 亚洲精品久久7777| 久久久久国产一区二区三区四区| 欧美大片在线观看一区| 国产一区清纯| 欧美在线播放一区| 欧美三级电影一区| 亚洲日韩第九十九页| 久久精品欧美| 狠狠色丁香久久婷婷综合丁香| 亚洲一区二区网站| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ入口 | 久久久久一区二区三区| 欧美日韩一卡二卡| 中国女人久久久| 国产精品v欧美精品v日韩精品| 日韩午夜在线| 国产精品女主播一区二区三区| 一区二区三区你懂的| 欧美三日本三级少妇三2023| 一本色道久久综合亚洲二区三区| 欧美剧在线免费观看网站| 99re6这里只有精品| 国产精品实拍| 久久免费视频在线| 在线视频亚洲| 国产精品视频网| 久久久www免费人成黑人精品| 国产综合色精品一区二区三区| 性欧美1819sex性高清| 玉米视频成人免费看| 欧美日韩国产综合久久| 欧美一级黄色网| 在线免费观看欧美| 国产欧美日韩精品专区| 欧美激情欧美激情在线五月| 亚洲一区三区视频在线观看| 国产在线乱码一区二区三区| 欧美视频日韩视频在线观看| 欧美在线视频免费播放| 日韩午夜av| 国产综合久久久久久鬼色| 国产精品高潮呻吟久久av无限| 久久精品一二三| 欧美专区在线观看| 亚洲午夜精品网| 一本一道久久综合狠狠老精东影业| 国产麻豆综合| 国产亚洲福利社区一区| 国产一区二区三区高清在线观看 | 国产农村妇女毛片精品久久麻豆| 欧美成人一品| 欧美激情一区在线观看| 欧美成人精品在线视频| 欧美风情在线观看| 欧美日韩国产三级| 欧美午夜激情在线| 国产精品视频免费观看| 国产精品日韩一区| 国产一区日韩欧美| 亚洲精品欧美专区| 香蕉久久夜色精品国产使用方法 | 国产精品一区一区| 国产欧美一区二区精品婷婷| 国产一区二区精品丝袜| 91久久线看在观草草青青| 一区电影在线观看| 久久国产精品毛片| 欧美成人免费在线视频| 国产一区二区三区久久 | 欧美伦理a级免费电影| 国产精品久久久久一区二区|