<! DOCTYPE html> Carousel with Title (manual):
<! DOCTYPE html> JS Control automatic carousel:
<! DOCTYPE html>You can set specific parameters in the Carousel () method, such as:
Property name |
Type |
Default value |
Describe |
Interval |
Number |
5000 |
Wait time (in milliseconds) for slide rotation. If False, the carousel will not automatically start looping |
Pause |
String |
Hover |
The default mouse hover stops playing in the slide area and starts playing when you leave |
Wrap |
Boolean value |
True |
Does the carousel continue to circulate |
When used, the relevant parameters can be passed when the plug-in is initialized, such as:
$ ("#slidershow"). Carousel ({ interval:3000});
The Carousel plugin in the BOOTSTRAP framework provides several special methods of invocation to the user, which are described briefly as follows:
- . Carousel ("cycle"): Play from left to right;
- . Carousel ("Pause"): Stop loop playback;
- . Carousel ("number"): Loop to the specified frame, subscript starting at 0, similar to array;
- . Carousel ("prev"): Returns to the previous frame;
- . Carousel ("Next"): Next Frame
Use the Data property to control the carousel:
<! DOCTYPE html>Declarative methods are implemented by defining the data property, which makes it easy to control the location of the carousel. It mainly includes the following types:
1. Data-ride property: Takes a value carousel and defines it on carousel.
2. Data-target property: The ID name or other style identifier defined by the value carousel, as shown in the previous example, with a value of "#slidershow" and defined on each Li of the Carousel chart counter.
3. Data-slide properties: Values include Prev,next,prev for backward scrolling, and next for scrolling forward. The property value is also defined on the a link of the carousel controller, and the controller href value is set to container 4. The ID name or other style identifier of the carousel.
4 O Data-slide-to attribute: Used to pass a frame subscript, such as data-slide-to= "2", you can jump directly to the specified frame (subscript starting from 0), also defined on each Li of the Carousel chart counter.
It is important to note that you can add a slide style to the #slidershow layer and have a smooth feel with the picture and picture transitions.
<DivId= "Slidershow"Class= "Carousel Slide"Data-ride= "Carousel" > </div>
In addition to Data-ride= "Carousel", Data-slide, and data-slide-to, the Carousel component also supports three additional custom properties:
Property name |
Type |
Default value |
Describe |
Data-interval |
Number |
5000 |
Wait time (in milliseconds) for slide rotation. If False, the carousel will not automatically start looping |
Data-pause |
String |
Hover |
The default mouse hover stops playing in the slide area and starts playing when you leave |
Data-wrap |
Boolean value |
True |
Does the carousel continue to circulate |
The following code implements the "Carousel not Continuous Loop" and "Carousel interval of 1 seconds".
<DivId= "Slidershow"Class= "Carousel"Data-ride= "Carousel"Data-wrap= "false" Data-interval = "> </div>
Reference: http://www.runoob.com/bootstrap/bootstrap-carousel-plugin.html
Bootstrap Picture Carousel