Bootstrap Carousel Plugin

Source: Internet
Author: User
Tags bootstrap carousel

Tag: false carousel function als IDE jpg button car boot

A Carousel

Basic instance.

<DivID= "Mycarousel"class= "Carousel Slide">  <olclass= "Carousel-indicators">    <LiData-target= "#myCarousel"data-slide-to= "0"class= "Active"></Li>    <LiData-target= "#myCarousel"data-slide-to= "1"></Li>    <LiData-target= "#myCarousel"data-slide-to= "2"></Li>  </ol>  <Divclass= "Carousel-inner">    <Divclass= "Item Active"> <imgsrc= "Yhmgc/img/1.jpg"alt= "First piece"> </Div>    <Divclass= "Item"> <imgsrc= "Yhmgc/img/2.jpg"alt= "Second Piece"> </Div>    <Divclass= "Item"> <imgsrc= "Yhmgc/img/3.jpg"alt= "Third piece"> </Div>  </Div>  <ahref= "#myCarousel"Data-slide= "Prev"class= "Carousel-control Left">&lsaquo;</a> <ahref= "#myCarousel"Data-slide= "Next"class= "Carousel-control Right">&rsaquo;</a> </Div>

The Data property explains:

1.data-slide accepts the keyword prev or next to change the position of the slide relative to the current position;

2.data-slide-to to create an original sliding index to the bottom of the carousel, data-slide-to= "2" will move the slider to a specific index, and the index is counted starting at 0.

3.data-ride= "Carousel" Property user-tagged carousel starts animation playback when the page loads.

There are three custom attributes for the Carousel plugin:

If you use the key-value pair method directly in JavaScript call, and remove data-;

Setting custom Properties

$ (' #myCarousel '). Carousel ({//interval:2000// Set pause button Events Pause: ' hover '//false,});

The Carousel plugin also provides some methods, as follows:

Click the button to execute

function// Click to automatically play $ (' #myCarousel '). Carousel (' Cycle '//  other similarities }

Event

function () {alert (' triggers as soon as the slide instance is invoked ');}); $ (function  () {alert (' When the carousel completes a slide trigger ');});

Bootstrap Carousel Plugin

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.