Bootstrap plug-in-carousel image, bootstrap-carousel usel

Source: Internet
Author: User
Tags bootstrap carousel

Bootstrap plug-in-carousel image, bootstrap-carousel usel

<! DOCTYPE html> 

The above uses declarative methods to achieve carousel

The declarative method is implemented by defining the data attribute, which can easily control the carousel position. It mainly includes the following types:

  • Data-ride attribute: The value is usel and is defined on usel.
  • Data-target attribute: The value is the ID defined by usel or another style identifier, as shown in the previous example. The value is "# slidershow ", and define it on each li of the carousel counter.
  • Data-slide attributes: values include prev, next, and prev, which indicate backward scrolling, and next, which indicates forward scrolling. The property value is also defined on the link of the carousel controller, And the href value of the controller is set to the ID of container carousel usel or another style identifier.
  • Data-slide-to attribute: used to pass the subscript of a frame. For example, data-slide-to = "2" can be directly redirected to the specified frame (the subscript starts from 0 ), it is also defined on each li of the carousel counter.

If the data-ride attribute is not defined, you can use the JavaScript method to trigger the carousel image switching:

<! DOCTYPE html> 

 

Related Article

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.